i386 bootsect.S & setup.S

From: jjore@imation.com
Date: Wed Jun 21 2000 - 10:25:04 EST


I'm looking to add bootable support for ATA floppies to bootsect.S but it's
currently chock full. Is there any reason why the code for deciding on a
root device is in bootsect.S and couldn't be moved to setup.S? Here's the
relevant code:

Joshua Jore
As always, not speaking for my employer.

# After that we check which root-device to use. If the device is
# defined (!= 0), nothing is done and the given device is used.
# Otherwise, one of /dev/fd0H2880 (2,32) or /dev/PS0 (2,28) or /dev/at0
(2,8)
# depending on the number of sectors we pretend to know we have.

     movw root_dev, %ax
     orw %ax, %ax
     jne root_defined

     movw sectors, %bx
     movw $0x0208, %ax # /dev/ps0 - 1.2Mb
     cmpw $15, %bx
     je root_defined

     movb $0x1c, %al # /dev/PS0 - 1.44Mb
     cmpw $18, %bx
     je root_defined

     movb $0x20, %al # /dev/fd0H2880 - 2.88Mb
     cmpw $36, %bx
     je root_defined

     movb $0, %al # /dev/fd0 - autodetect
root_defined:
     movw %ax, root_dev

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:22 EST