Hey yall.
I have got most of the nitty gritty parts of my operating done(gdt, idt, exceptions, irq, still missing a memory manager) and now I would like to implement a file system.
I have good experience with FAT, and i should be fine with parsing and processing filesystem data, but my problem is getting data. How can I read data of the harddrive(not floppy) in protected mode? I am writing my kernel in C and i would prefer to use as little assembler as possible. So again, how, in C, can i read of a harddrive in protected mode? Thanks
P.S. Whenever i said harddrive i really meant 'harddisk'
Read data of harddrive in pmode(in C)????
Re: Read data of harddrive in pmode(in C)????
First of all I'd recommend writing a memory manager if you still haven't done one before writing drivers.
Second, you need to first iterate pci space to see which storage controllers actually are available (ide, AHCI etc) and then you need to write the storage driver for the available controllers (probably IDE or AHCI)
Second, you need to first iterate pci space to see which storage controllers actually are available (ide, AHCI etc) and then you need to write the storage driver for the available controllers (probably IDE or AHCI)
Re: Read data of harddrive in pmode(in C)????
Hia.
I know this a complete different question, but how would i write this memory manager. I cant find any resources on it....
Thanks for the quick reply
I know this a complete different question, but how would i write this memory manager. I cant find any resources on it....
Thanks for the quick reply
-
- Member
- Posts: 283
- Joined: Mon Jan 03, 2011 6:58 pm
Re: Read data of harddrive in pmode(in C)????
Next time, look through the wiki before posting here. (Hint: the answers to both of your questions and answered fully in the wiki)
- Monk
- Monk