bootsect help !!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

 > First of all thanks a lot for the help i received for my previous query
 > regarding bootsect.S . I was adviced to go thru few documents and links
 > which i have done ,still some doubts persists .
Hope we can eliminate at least some of your left questions.


 > a) Regarding Disk Parameter Table
 >       The default DPT is copied to location 0:4000-12 and the number
 > of sectors/track field is changed to 36 . Later we try to get the number
 > of sectors/track by trying to read the 36th sector then 18th so on.
 > I guess this probably means that regardless of the sectors/track value
 >  we write to DPT we can read only that many sectors that the disk 
controller
 >  supports ,if so what is the idea of changing the DPT sector/track field
 > to 36 ?
Some BIOS doesn't allow reading more sectors then specified in the FDPT. 
That's why we're going to overwrite the value stored there with 36 
(which should be fairly high enough). The second limitation we've to 
dealt with is the floppy drive itself. In some (mostly older) computers 
reading of sectors is allowed as long as on cylinders are crossed. Say 
you wanne read 30 sectors with INT 13 (set %al to 30) and your device 
has to move its head to an other cylinder in between, then the behaviour 
of the BIOS is un-specified. The BIOS has no problem to read more than 
one sector a time as long as there are no heads in between. So we have 
to determine whether there is a cylinder crossing. If so then we've to 
move explicitly the head.

 >b) The part where we check which root device to use
 >               What exactly is meant by root device and how it is 
detected ?
Sorry, I'm also not sure.


 > c) System is loaded to mem location 0x10000 ,it is insisted that no 64 KB
 >   boundries are crossed ,why so ?
I think you'll find this out if you're deeper in the memory mechanism 
Linux uses on Intels architecture. Beleive me, most thing will come 
automatically if you got the global view of how things are realized in 
Linux.  For the moment I recommend you to trust Linux and moving 
straight forward. Don't look for those little bits and bytes which are 
preventing you for getting an expert :-). My succetion is moving from 
bootsect.S to setup.S (excluding video.S - you do not realy need it). If 
you got an overview go to compressed/head.S and then to kernel/head.S. 
All the time keep an eye to the Makefiles and the results of the 
compilation process.


 > d)  " This procedure turns off the floppy drive motor, so  that we 
enter the kernel
 > in a known state, and  don't have to worry about it later."
 >     
 > If we don't turn off the motor what do we have to worry about ??
Just interpretated: http://www.kernelnewbies.org/faq/index.php3#masters
Please, be serious... :-)

 
 > My prior apologies if the queries are too silly ,once again thanks for
 > the help received
 >                       gopakumar
All right, hope it helped.

// Gerrit

P.s.: ctags (man ctags; vi and then :help ctags) and cscope 
(http://cscope.sourceforge.net/) helped me a lot in the beginning. Try 
it out and have fun.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux