Hi Brian,
i send you patches for booteasy & bootnorm fdisk code. Some buggy BIOSes
can cause following fatal problems:
- 0x00 instead of 0x8? in DL while booting
- changing dl while LBA test
For booteasy: This loader doesn't test LBA so i only comment entry
code and use or DL, 0x80. I tested it on TI, AST and some k6-II and
Barton based workstations.
For bootnorm: I use or DL, 0x80 in read_boot_sector and push&pop DX.
I take this from GNU grub which solves same problems. I tested this too.
This is necessary for TI Extensa 600cd notebook & for AST bravo
desktop station. Please aply and let me know when release new version of
fdisk - i need this because i don't have borland tc++ for compile and
need fdisk for automatic backup & recovery.
--
-------------------------------------------------------
David "Dave" Jez Brno, CZ, Europe
E-mail: [EMAIL PROTECTED]
PGP key: finger [EMAIL PROTECTED]
---------=[ ~EOF ]=------------------------------------
booteasy.asm | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
--- orig/source/booteasy/booteasy.asm Wed Nov 6 19:04:34 2002
+++ new/source/booteasy/booteasy.asm Thu Nov 4 10:14:52 2004
@@ -125,9 +125,10 @@
; The main entry to the boot
;
Entry:
- cmp DL,81h ; DL contains current drive number
- je driveok ; is it valid?
- mov DL,80h ; no - use the default value
+; cmp DL,81h ; DL contains current drive number
+; je driveok ; is it valid?
+; mov DL,80h ; no - use the default value
+ or DL,80h ; workaround for buggy BIOSes
driveok: mov BP,DX ; save the drive number
inc DX ; 80h -> 81h, 81h -> 82h
xor DL,80h+'3' ; 80h -> '2', 81h -> '1'
bootnorm.asm | 3 +++
1 files changed, 3 insertions(+)
--- orig/source/bootnorm/bootnorm.asm Sat Oct 19 23:28:40 2002
+++ new/source/bootnorm/bootnorm.asm Thu Nov 4 10:14:46 2004
@@ -103,10 +103,13 @@
;*****************************
read_boot_sector:
+ or dl,0x80 ; workaround for buggy BIOSes
+ push dx ; some BIOSes changes DL here
; /* check for LBA support */
mov bx,0x55aa
mov ah,0x41
int 0x13
+ pop dx
jc StandardBios ; if (regs.b.x != 0xaa55 || (regs.flags & 0x01))
cmp bx,0xaa55 ; goto StandardBios;