From OSDev Wiki
Jump to: navigation, search

BIOS in Protected Mode

A few times the topic has appeared on the forums talking about software real-mode emulation to call the BIOS in protected and long mode. How this is achieved is currently outside my field of knowledge, but I think it would be a valuable addition if someone is able to add the following to the article;

1. Why can't BIOS functions be called in pmode?

2. What happens when they are called? (Beyond 'it crashes' - why? What is the CPU doing?)

3. How do software 'real mode emulators' work?

4. What are the minimum requirements of such an emulator in order to interact with the BIOS and how does it do so?

5. Could such an emulator dynamically recompile/wrap real-mode BIOS calls so you can call them from pmode/lmode natively?

--MessiahAndrw 02:56, 14 December 2009 (UTC)

Re 2: In real mode, at address given by [DS:AX] means "[(DS << 4) + AX]". In protected mode, it means [{segment descriptor indicated by DS}.base + AX]. There is little chance these two will match (even less, since the code will probably try to put new values into DS, which are not going to resolve into proper descriptors.

The BIOS code is written assuming real mode.

Nedbrek 04:01, 16 December 2009 (UTC)

These questions are now (mostly?) covered on the Virtual 8086 Mode and Protected mode pages.

Eekee 11:53, 12 June 2019 (CDT)

Why don't we document the arguments to the common BIOS interrupts here?

Lots of places online only the interrupt number and ah value is listed. should have a nice table with the arguments and some words about how the interrupt calls work.

Should it be this page or should there be a new page? Is it a problem of there being no real standard? Is it a copyright issue?

ask 00:35, 09 June 2019 (UTC)

"The" exhaustive list which has been around for a long time is Ralph Brown's Interrupt List, AKA RBIL. Duplicating it would be rather pointless, an immense amount of work, and possibly treble the size of the size of the wiki. :) It's mentioned in this page with a link to its own page, which in turn links to several places to get it. When RBIL lacks info on an interrupt, it's because it's specific to certain manufacturers or even models of PC compatible, or even to a proprietary TSR. Eekee 11:48, 12 June 2019 (CDT)

Personal tools