More real mode instruction and interrupt mechanics tests.#23
More real mode instruction and interrupt mechanics tests.#23superfury wants to merge 59 commits intobarotto:masterfrom
Conversation
- Renamed 16-bit TSS CS register value to match ther other 16-bit TSS entries.
… or using a gate.
…gs, segment selector and general purpose register validation.
… validation and task switching
Fixed TSS user mode accessible data segments for validation.
Fixed TSS test data segment limits. Fixed TSS base addresses
Improved 286 and 386 task flags validation.
Fixed 16-bit TSS initialization not to clear the 32-bit TSS.
…mode from flat user mode.
Implemented 286 and 386 task LDTR test.
…ter are always set.
… 64KB of a configurable 128KB ROM.
Renamed the low BIOS area and high bios area to system BIOS area and system BIOS extensions area.
…te the busy bit, backlink field and NT flag of a either a specified TSS or the EFLAGS register.
Reduced basic TSS testing, as it's handled in detail at a later point in the code.
Fixed issues with the nested task setup helper function.
…ed task flag, fixing errata in the 80386 programmer's reference manual.
…ch functionality for both 16-bit and 32-bit TSS. Improved initial and final stack when switching to and from flat user mode. Implemented Task-Switched flag validation when executing TSS task switches.
…he system BIOS extensions area storing the validation function, being required for said validation to be performed.
Added a test for interrupts in real mode. Updated the POST numbers to reflect the newly added real mode tests.
|
Just thought of a little improvement to the real and protected mode interrupt tests: check if the interrupt flag is cleared (both for real mode interrupts and the PL0 protected mode interrupt). Just need to implement that test. |
…d mode interrupt gates clearing and properly storing of the interrupt flag on the stack and eflags register. Moved the kernel mode only interrupt handler to the system bios expansion area to create required space to compile the new code.
|
The latest changes also check if the interupt flag is cleared (both for the real mode interrupts and protected mode interrupt elevating to ring 0) and properly set on the stack (only the case of it being set is checked however, no check for interrupt trap gates is performed). I did need to move the int 20h interrupt handler to the extension space to make room for the newly changed instructions (the upper 64K ROM ran out of room to compile it). Thus also requiring the privilege change check (from CPL 3 user mode to CPL 0 kernel mode through a non-conforming segment and DPL 3 gate) to require the 128K ROM now (otherwise, it wouldn't fit). |
|
I pass the tests. However:
Also you changed most POST codes, don't forget to update intel-opcodes.ods accordingly. |
|
The times -4 error means that the 64K ROM area is too small to contain the data (overflowing the FFF0 address by 4 bytes in this case). I've already moved some code down to fix that error I've got earlier. Unless I move even more code down to the lower area to fix that too (requiring the 128K ROM for even more tests). |
…IOS expansion area with less returns to the system BIOS area.
|
I've compressed the POST 8/9/A tests a bit, removing some of their needs to jump to and from the upper ROM half. This should give just enough spare room to get those configurations to work properly in all cases from what I can see. Reverting the POST codes right now is a bit of an issue? It's been moved twice already, so it's kind of difficult to figure out what their originals were? Unless I revert all of them and simply modify the newly added ones? |
Modified the newly added POST numbers to fill the unused range instead. Moved the loop tests back to POST 1 to match the documentation.
|
I've reverted the POST codes back to what they were during the last pull request. Then modified the newly added POST codes to use POST 7 (which was unused, now used for the real mode interrupt test) and 1D-1F for the other newly added tests. That still leaves POST A that was split up into the 20-22 POST codes as a gap in the used POST code range, but that's not that much of an issue, since it's not documented in the intel-opcodes.ods file (it tests mechanics, not instructions)? |
A few more tests I've added just now:
I've also adjusted the POST codes to add the new tests (included in the 128K ROM only). And updated the Readme to match the new POST codes.
That just leaves the following instructions and mechanics untested: