Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Work around Xi8088 BIOS bug by setting DS = 40h for 13.41 call #156

Open
ecm-pushbx opened this issue May 5, 2024 · 1 comment

Comments

@ecm-pushbx
Copy link
Contributor

ecm-pushbx commented May 5, 2024

Circling back to the Xi8088 BIOS bug that affected at least some revisions of the Book8088:

The bug was described in http://www.bttr-software.de/forum/forum_entry.php?id=21275

This is where the kernel may call a ROM-BIOS that doesn't support LBA to detect that it doesn't support LBA:

kernel/kernel/initdisk.c

Lines 651 to 657 in 1b6de0f

/* check for LBA support */
regs.b.x = 0x55aa;
regs.a.b.h = 0x41;
regs.d.b.l = drive;
regs.flags = FLG_CARRY; /* ensure carry is set to force error if unsupported */
init_call_intr(0x13, &regs);

My idea is to force DS = 40h for this call, which will work around the bug of the BIOS writing to offset 41h without setting up DS.

I didn't have this idea yet because my use of 13.42 without the proper 13.41 check call makes this more difficult, however I just added a workaround to the Xi8088 bug to the callers that are not as size constrained as the lDOS boot sector loaders, eg lDOS iniload: https://hg.pushbx.org/ecm/ldosboot/rev/4c929733a229

(I will upload a blog post that also addresses this later.)

@boeckmann
Copy link
Contributor

Sounds reasonable. That is directly related to my question on the developer mailinglist some time ago to what DS should be set in this case. There is a (closed) related FDISK issue FDOS/fdisk#80. I may implement setting DS as well for FDISK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants