Module pm

Source
Expand description

Power Management Device (as found on the PIIX4 chipset - kinda)

§What’s with all this PIIX4 stuff?

The current implementation of PowerManagementDevice is based off code in Hyper-V, which happens to emulate the specific PM device as found on the PIIX4 chipset.

…well, kinda.

This current implementation is only a partial port of the PM device found on the PIIX4 chipset, with a good chunk of the PIIX4 functionality having been lifted into a wrapper device found under chipset_legacy/piix4_pm.rs.

§So, what’s next?

Eventually, this device should be swapped out for a minimal “generic” PM / ACPI device, with all remaining PIIX4 specific functionality being lifted into the legacy piix4_pm device (which may or may not end up reusing the generic PM device as part of its implementation).

Of course, there’s always the tricky issue that the current implementation works fine, so when this work is going to happen… well, your guess is as good as mine.

Structs§

DynReg
Power management I/O offsets from base port address
EnableAcpiMode
This is used when running the UEFI BIOS. When passed via PowerManagementDevice::new, the device will pre-populate various register values + automatically map the dynamic memory regions at the specified port io address.
PowerManagementDevice
A power management + ACPI device.

Enums§

PowerAction
Power action being requested

Constants§

RESET_VALUE
Value that initiates a system reset when written to DynReg::RESET.

Traits§

PmTimerAssist
Interface to enable/disable hypervisor PM timer assist.

Type Aliases§

PowerActionFn
Callback invoked whenever a power action is requested