Archive for November, 2007

Reading a bit…

Sunday, November 18th, 2007

Last week I started working on my graduation project. It’s a full-time job and at the moment my top priority. During the weekend I try not to spend too much time using the computer. For example, next weekend I will go to a concert of Sonata Arctica :-). Last weekend I have been keeping up with the emails on grub-devel so GRUB 2 will remain to be maintained.

Besides that, I am reading Operating Systems Design and Implementation by Andrew Tanenbaum. Although I know quite a lot on this subject already, I am reading it to refresh my memory on this subject and to prepare myself to read more papers on microkernel design. I have the silly idea to waste my precious time on writing my own microkernel some day. More importantly, I like reading and I do not want to spent too much time working on the computer. I am considering buying the book Modern Operating Systems, also by Andrew Tanenbaum. Can someone tell me if this is a good book and if it doesn’t have too much overlap with the book I am currently reading?

So I do not have much time at the moment. Still, I intend to finish the ATA driver and networking support for GRUB 2 somewhere in 2007. Also, I want to get the Dirac code for FFmpeg in shape so it can be committed soon. I am not sure if doing all this in 2007 is realistic though…

ATA/ATAPI driver for GRUB 2

Saturday, November 3rd, 2007

Last week I committed a patch to add support for ATA and ATAPI to GRUB 2. The ATA driver supports the CHS, ATA and ATA48 sector addressing methods. It should be capable of reading from and writing to every ATA harddisk. The ATAPI support is only capable of reading sectors from CDROM. I still have to add features like reading the sector count.

This driver will be especially useful forĀ  the LinuxBIOS port that has been recently committed. It can also be used to load something from CDROM when the BIOS doesn’t have CDROM support. Although I should further look into this, the only thing I have tested is loading files from CDROM.

There are several shortcomings in this driver. My driver and the one in the BIOS do not like each other. After my driver initializes, disk access from the BIOS might result in a crash. Therefore it disables biosdisk support. It also means that windows, for example, cannot be loaded using this driver because it later on accesses the disk via the BIOS interface. Perhaps this problem can be avoided by not resetting disks or storing the state somehow. I would appreciate it if someone can explain how I should do this properly so it will work on all systems.

Another shortcoming is its speed. For the moment it waits one tick, which is the shortest time GRUB can currently wait. One tick is 1/18th of a second, while it isn’t required to wait this long. Because of this, when the driver waits, it is wasting way too much time.