Skip to main content

Module system

Module system 

Source
Expand description

Chipset system-control ports (0x92 and 0xCF9).

PC firmware toggles the A20 gate through port 0x92 before it enters protected mode, and resets the machine through the same port or through the PCI reset control register 0xCF9. A guest that does not see the A20 bit it wrote assumes the gate stayed closed and falls back to the keyboard controller (which the 8042 model does not implement), so the bit must read back.

The model is deliberately small: A20 state and reset requests. Reset is recorded and reported to the runner, which turns it into a clean guest abort instead of restarting the world underneath the firmware.

Structs§

SystemControl
State of the system-control ports.

Constants§

A20_ENABLE
0x92 bit 1: A20 gate enabled.
FAST_RESET
0x92 bit 0: fast reset request.
PORT_A
System control port A (A20 gate and fast reset).
PORT_RESET
PCI reset control register.

Functions§

handles_port
True if port belongs to the system-control model.