2009-06-16 Pavel Roskin <proski@gnu.org>
* boot/i386/pc/boot.S: Remove root_drive. Assert offset of boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't save %dx, we only need %dl and we never change it. * boot/i386/pc/cdboot.S: Don't set the root drive. * boot/i386/pc/pxeboot.S: Likewise. * include/grub/i386/pc/boot.h: Remove GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust GRUB_BOOT_MACHINE_DRIVE_CHECK. * include/grub/i386/pc/kernel.h: Remove grub_root_drive. * kern/i386/pc/init.c (make_install_device): Remove references to grub_root_drive. * kern/i386/pc/startup.S: Likewise. * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
This commit is contained in:
parent
693fe63766
commit
3ef17a2ebf
9 changed files with 27 additions and 36 deletions
|
@ -102,8 +102,6 @@ kernel_sector:
|
|||
boot_drive:
|
||||
.byte 0xff /* the disk to load kernel from */
|
||||
/* 0xff means use the boot drive */
|
||||
root_drive:
|
||||
.byte 0xff
|
||||
|
||||
after_BPB:
|
||||
|
||||
|
@ -118,6 +116,7 @@ after_BPB:
|
|||
* possible boot drive. If GRUB is installed into a floppy,
|
||||
* this does nothing (only jump).
|
||||
*/
|
||||
. = _start + GRUB_BOOT_MACHINE_DRIVE_CHECK
|
||||
boot_drive_check:
|
||||
jmp 1f /* grub-setup may overwrite this jump */
|
||||
testb $0x80, %dl
|
||||
|
@ -151,14 +150,12 @@ real_start:
|
|||
/*
|
||||
* Check if we have a forced disk reference here
|
||||
*/
|
||||
/* assign root_drive at the same time */
|
||||
#ifdef APPLE_CC
|
||||
boot_drive_abs = ABS (boot_drive)
|
||||
movw boot_drive_abs, %ax
|
||||
movb boot_drive_abs, %al
|
||||
#else
|
||||
movw ABS(boot_drive), %ax
|
||||
movb ABS(boot_drive), %al
|
||||
#endif
|
||||
movb %ah, %dh
|
||||
cmpb $0xff, %al
|
||||
je 1f
|
||||
movb %al, %dl
|
||||
|
@ -343,7 +340,6 @@ setup_sectors:
|
|||
|
||||
/* restore %dl */
|
||||
popw %dx
|
||||
pushw %dx
|
||||
|
||||
/* head start */
|
||||
movb %al, %dh
|
||||
|
@ -399,7 +395,6 @@ copy_buffer:
|
|||
|
||||
popw %ds
|
||||
popa
|
||||
popw %dx
|
||||
|
||||
/* boot kernel */
|
||||
#ifdef APPLE_CC
|
||||
|
|
|
@ -86,9 +86,6 @@ bi_reserved:
|
|||
|
||||
call read_cdrom
|
||||
|
||||
/* Root drive will default to boot drive */
|
||||
movb $0xFF, %dh
|
||||
|
||||
ljmp $(DATA_ADDR >> 4), $0
|
||||
|
||||
/*
|
||||
|
|
|
@ -27,8 +27,7 @@
|
|||
_start:
|
||||
start:
|
||||
|
||||
/* Root drive will default to boot drive */
|
||||
movb $0xFF, %dh
|
||||
/* Use drive number 0x7F for PXE */
|
||||
movb $0x7F, %dl
|
||||
|
||||
/* Jump to the real world */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue