2001-12-30 Yoshinori K. Okuji <okuji@gnu.org>
* stage1/stage1.S: Don't call INT 13, AH=48H, because it is difficult to call this function with the workaround implemented in the previous change due to the size limit of Stage 1. (lba_mode) [NO_BUGGY_BIOS_IN_THE_WORLD]: Don't check the geometry explicitly. This shouldn't be harmful, as INT 13, AH=42H should take care of it, and if you cannot read Stage 2 even with LBA because of a geometry problem, you can never read it. * stage2/start.S (lba_mode) [NO_BUGGY_BIOS_IN_THE_WORLD]: Likewise.
This commit is contained in:
parent
4cd09c4b6a
commit
59d735d43f
3 changed files with 17 additions and 25 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
||||||
|
2001-12-30 Yoshinori K. Okuji <okuji@gnu.org>
|
||||||
|
|
||||||
|
* stage1/stage1.S: Don't call INT 13, AH=48H, because it is
|
||||||
|
difficult to call this function with the workaround implemented
|
||||||
|
in the previous change due to the size limit of Stage 1.
|
||||||
|
|
||||||
|
(lba_mode) [NO_BUGGY_BIOS_IN_THE_WORLD]: Don't check the
|
||||||
|
geometry explicitly. This shouldn't be harmful, as INT 13,
|
||||||
|
AH=42H should take care of it, and if you cannot read Stage 2
|
||||||
|
even with LBA because of a geometry problem, you can never read
|
||||||
|
it.
|
||||||
|
|
||||||
|
* stage2/start.S (lba_mode) [NO_BUGGY_BIOS_IN_THE_WORLD]:
|
||||||
|
Likewise.
|
||||||
|
|
||||||
2001-12-30 Yoshinori K. Okuji <okuji@gnu.org>
|
2001-12-30 Yoshinori K. Okuji <okuji@gnu.org>
|
||||||
|
|
||||||
* stage2/bios.c (get_diskinfo): Clear out the structure DRP
|
* stage2/bios.c (get_diskinfo): Clear out the structure DRP
|
||||||
|
|
|
@ -163,21 +163,10 @@ real_start:
|
||||||
/* check if AH=0x42 is supported if FORCE_LBA is zero */
|
/* check if AH=0x42 is supported if FORCE_LBA is zero */
|
||||||
MOV_MEM_TO_AL(ABS(force_lba)) /* movb ABS(force_lba), %al */
|
MOV_MEM_TO_AL(ABS(force_lba)) /* movb ABS(force_lba), %al */
|
||||||
testb %al, %al
|
testb %al, %al
|
||||||
jnz skip_lba_bitmap_check
|
jnz lba_mode
|
||||||
andw $1, %cx
|
andw $1, %cx
|
||||||
jz chs_mode
|
jz chs_mode
|
||||||
|
|
||||||
skip_lba_bitmap_check:
|
|
||||||
|
|
||||||
/* get the geometry (limited to 2TB!) */
|
|
||||||
movb $0x48, %ah
|
|
||||||
movw $STAGE1_DRP_ADDR, %si
|
|
||||||
movw $STAGE1_DRP_SIZE, (%si)
|
|
||||||
int $0x13
|
|
||||||
|
|
||||||
/* use CHS if fails */
|
|
||||||
jc chs_mode
|
|
||||||
|
|
||||||
lba_mode:
|
lba_mode:
|
||||||
/* save the total number of sectors */
|
/* save the total number of sectors */
|
||||||
movl 0x10(%si), %ecx
|
movl 0x10(%si), %ecx
|
||||||
|
@ -190,12 +179,6 @@ lba_mode:
|
||||||
|
|
||||||
movl ABS(stage2_sector), %ebx
|
movl ABS(stage2_sector), %ebx
|
||||||
|
|
||||||
/* check for the geometry */
|
|
||||||
#ifdef NO_BUGGY_BIOS_IN_THE_WORLD
|
|
||||||
cmpl %ecx, %ebx
|
|
||||||
jge geometry_error
|
|
||||||
#endif /* NO_BUGGY_BIOS_IN_THE_WORLD */
|
|
||||||
|
|
||||||
/* the size and the reserved byte */
|
/* the size and the reserved byte */
|
||||||
movw $0x0010, (%si)
|
movw $0x0010, (%si)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* GRUB -- GRand Unified Bootloader
|
* GRUB -- GRand Unified Bootloader
|
||||||
* Copyright (C) 1999,2000 Free Software Foundation, Inc.
|
* Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -96,12 +96,6 @@ lba_mode:
|
||||||
/* load logical sector start */
|
/* load logical sector start */
|
||||||
movl (%di), %ebx
|
movl (%di), %ebx
|
||||||
|
|
||||||
/* check for the geometry */
|
|
||||||
#ifdef NO_BUGGY_BIOS_IN_THE_WORLD
|
|
||||||
cmpl %ecx, %ebx
|
|
||||||
jge geometry_error
|
|
||||||
#endif /* NO_BUGGY_BIOS_IN_THE_WORLD */
|
|
||||||
|
|
||||||
/* the maximum is limited to 0x7f because of Phoenix EDD */
|
/* the maximum is limited to 0x7f because of Phoenix EDD */
|
||||||
xorl %eax, %eax
|
xorl %eax, %eax
|
||||||
movb $0x7f, %al
|
movb $0x7f, %al
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue