OS icon indicating copy to clipboard operation
OS copied to clipboard

Fix BIOS32 so it can be more reliable

Open sasdallas opened this issue 1 year ago • 0 comments

Hi,

I've noticed a few bugs in your BIOS32 implementation that I myself had, and later fixed.

For instance - you called sti to enable interrupts, but that will also enable external interrupts which have not been mapped in the IDT/GDT (since they are real mode) and will crash the system if BIOS32 is used in a more high-level environment.

A few other fixes, such as not clobbering a few other registers and flushing the TLB after disabling paging, and here is my result.

Your previous code, while it works, will cause issues if used in a higher-level system, like my OS. I learned and solved these bugs the hard way. Specifically, BIOS32 causes serious issues when combined with virtual memory management.

I have tested the code changes and they pass the tests, and produce the same results as your old code but can be used in higher-level implementations.

I hope this helps! Please let me know if further changes are needed.

sasdallas avatar Jul 30 '24 02:07 sasdallas