Skip to content

[kernel] Issue BIOSHD disk reset when ATA CF driver present on boot#2411

Merged
ghaerr merged 2 commits intomasterfrom
copy86
Oct 20, 2025
Merged

[kernel] Issue BIOSHD disk reset when ATA CF driver present on boot#2411
ghaerr merged 2 commits intomasterfrom
copy86

Conversation

@ghaerr
Copy link
Copy Markdown
Owner

@ghaerr ghaerr commented Oct 20, 2025

Finally fixes extended boot delay issue discussed in #2408 (comment).

When the ATA CF driver is initialized, the BIOSHD driver was hanging on the next I/O request, which happened to be in the MBR partition handling code. Apparently both drivers talking to the same ATA hardware caused the BIOS code to wait 30 seconds before returning an I/O error, then retrying. Issuing a BIOS disk reset beforehand eliminates this problem.

@ghaerr ghaerr merged commit 4e4618a into master Oct 20, 2025
1 check passed
@ghaerr ghaerr deleted the copy86 branch October 20, 2025 17:39
@ghaerr ghaerr mentioned this pull request Oct 20, 2025
@toncho11
Copy link
Copy Markdown
Contributor

Tested quickly, seems OK now.
Thank you.

@toncho11
Copy link
Copy Markdown
Contributor

toncho11 commented Oct 21, 2025

I have not tested using the cfa driver, just booting as image provided.
What are the chances that the reset from hda driver will interfere with the cfa when configured to be used?

I just tried xtide=0 in copy.86 and it was fine.

@ghaerr
Copy link
Copy Markdown
Owner Author

ghaerr commented Oct 21, 2025

What are the chances that the reset from hda driver will interfere with the cfa when configured to be used?

That's a pretty good question, I am assuming the problem is that the BIOS likely caches some ATA hardware settings and needs a reset in order to prevent a retry, which then internally does a reset. So I tested some more with copy.86 and it all seems to be working well.

I am guessing that copy.86 uses a real BIOS which emulates the potential problem better than QEMU, whose BIOS is written in C. QEMU has not shown any retry behaviour, so I hadn't seen it previously. I'll be testing on copy.86 more frequently now.

I just tried xtide=0 in copy.86 and it was fine.

Great! I think we're good to go, another ATA CF problem solved. Thank you!

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

Successfully merging this pull request may close these issues.

2 participants