From 59d735d43f298b199c6de4bcc207152fd5fa2083 Mon Sep 17 00:00:00 2001 From: okuji Date: Sun, 30 Dec 2001 08:23:16 +0000 Subject: [PATCH] 2001-12-30 Yoshinori K. Okuji * 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. --- ChangeLog | 15 +++++++++++++++ stage1/stage1.S | 19 +------------------ stage2/start.S | 8 +------- 3 files changed, 17 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4c5d3a19c..88b317aee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2001-12-30 Yoshinori K. Okuji + + * 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 * stage2/bios.c (get_diskinfo): Clear out the structure DRP diff --git a/stage1/stage1.S b/stage1/stage1.S index bbbf788fd..08c76d693 100644 --- a/stage1/stage1.S +++ b/stage1/stage1.S @@ -163,21 +163,10 @@ real_start: /* check if AH=0x42 is supported if FORCE_LBA is zero */ MOV_MEM_TO_AL(ABS(force_lba)) /* movb ABS(force_lba), %al */ testb %al, %al - jnz skip_lba_bitmap_check + jnz lba_mode andw $1, %cx 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: /* save the total number of sectors */ movl 0x10(%si), %ecx @@ -190,12 +179,6 @@ lba_mode: 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 */ movw $0x0010, (%si) diff --git a/stage2/start.S b/stage2/start.S index de5c44e5f..9a7d5048f 100644 --- a/stage2/start.S +++ b/stage2/start.S @@ -1,6 +1,6 @@ /* * 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 * it under the terms of the GNU General Public License as published by @@ -96,12 +96,6 @@ lba_mode: /* load logical sector start */ 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 */ xorl %eax, %eax movb $0x7f, %al