Re: [Geekos-devel] Re: IDE driver details
Status: Pre-Alpha
Brought to you by:
daveho
From: Parc <ne...@ri...> - 2002-01-29 18:38:02
|
On Tue, Jan 29, 2002 at 11:57:54AM -0500, David Hovemeyer wrote: > Hi Vishal, > > On Tue, Jan 29, 2002 at 04:41:19AM -0800, Vishal Soni wrote: > > Hi Dave, > > > > As ATA 1 standard specifies there are two modes of operation > > 1. CHS-Cylinder Head Sector > > 2. LBA-Logical Block Access (Drive is treated as logical array of > > 512byte blocks) > > > > Which of the following modes u are planning to use for Virtual Memory > > implementation?? > > > > This is necessary for me to make a C interface for the Kernel for > > access. > > I think LBA mode would be a lot nicer to deal with than CHS. > Maybe the driver could emulate LBA for drives/controllers that don't support > LBA, so that the kernel API for all block devices was LBA. > CHS will limit the size of HD you can use. It'll also slow down the driver as it has to do the translations. > I must admit I really don't know a lot about hard drives (or > operating systems :-), so I may not be aware of all of the issues. > > > We could possibly have a driver that would allow us to use LBA and CHS > > mode. I am not sure what modes drives operate in VM systems, ff you have > > some idea let me know. > > I don't think whether or not virtual memory is in use makes a > difference, unless you're using DMA (which I think needs physical > addresses). > This brings up an issue that I've been thinking about for a couple weeks now. The malloc currently in geekos doesn't really know about physical memory. The DMA code is going to need physical addresses to work. Not only that, but physical addresses also cannot cross segment boundries. > Just to double-check: you're working with the experimental > version of GeekOS? http://geekos.sourceforge.net/experimental.html > All new development will be on that version. > > > Write now I have modified the kernel boot up code to get some drive > > parameters from BIOS Hard Disk drive parameter table. This information > > is propagated to the Main() function. > > Good. Did you add new fields to the boot_info struct? > This is a good start, however, it's better to not use BIOS to talk to drives at all. BIOS is going to limit you to the first 1024 cylinders to read from, causing weird issues with large partitions. But then again, it's not ultra important at this point. > > I have most of the stuff for ATA-1 > > driver figured out. The interface C code I am planning to add to the > > kernel right now would have some basic functionality of > > 1. Initializing drives > > 2. Read sectors/blocks > > 3. Write sectors/blocks > > 4. Querying drive information > > 5. Seek > > > > and some other commands. > > > > I am not planning to use DMA or interrupts for this initial version of > > driver. So it will be strictly Programmed I/0 achieved by communicating > > at IN/OUT ports > I've been working on DMA, and I'll post when it's done. Once we geek the memory allocation stuff ready, it'll be a breeze. > This all sounds great! Let me know if you have any other questions. > Also, feel free to send email to the geekos-devel mailing list, > that way everyone working on geekos will know what you're doing. > > -Dave Also, I've got an updated patchset coming here shortly for the timer code. We now have an RTC, although it's useless until I write some syscalls for it... -neal > > _______________________________________________ > Geekos-devel mailing list > Gee...@li... > https://lists.sourceforge.net/lists/listinfo/geekos-devel > |