Skip to content

Commit 9b9b5b1

Browse files
ecm-pushbxPerditionC
authored andcommitted
initdisk.c: work around Xi8088 ROM-BIOS bug for int 13.41 [fixes #156]
Setting ds = 40h for int 13h function 41h is to work around a Xi8088 ROM-BIOS bug. All LBA extensions functions are affected, but only the detection call will reach the bug code because that BIOS reports that it doesn't support the LBA extensions. Refer to #156 and https://www.bttr-software.de/forum/forum_entry.php?id=21275
1 parent e3bfd6a commit 9b9b5b1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

kernel/initdisk.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,10 @@ STATIC int LBA_Get_Drive_Parameters(int drive, struct DriveParamS *driveParam, i
652652
regs.b.x = 0x55aa;
653653
regs.a.b.h = 0x41;
654654
regs.d.b.l = drive;
655+
regs.ds = 0x40;
656+
/* ds = 40h is to work around a Xi8088 ROM-BIOS bug,
657+
refer to https://github.com/FDOS/kernel/issues/156
658+
and https://www.bttr-software.de/forum/forum_entry.php?id=21275 */
655659
regs.flags = FLG_CARRY; /* ensure carry is set to force error if unsupported */
656660

657661
init_call_intr(0x13, &regs);

0 commit comments

Comments
 (0)