Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] virtio: detect PIIX4 and attempt to power off via ACPI hack (broken) #501

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mbacarella
Copy link

This is attempt 2 of 2 to solve #499 (attempt 1 was #500)

Summary:

This is my failed attempt to resolve #499 . It will detect the PIIX4 on GCE and attempt to power off if you exit the mirage unikernel (e.g. raise an uncaught exception right after you start), but it hangs instead of powering off because it's not a correct implementation.

Discussion:

Detecting the PIIX4 on the PCI bus works; it requires a simple change to the pci_enumerate function to list "functions" of PCI devices. Then it attempts to parse just enough of ACPI to learn parameters needed to power off. This approach is probably not generally feasible, but may work on GCE.

This adapts the method from C code here https://forum.osdev.org/viewtopic.php?t=16990 though it fails.

More information at #499.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

virtio: implement ACPI power-off
1 participant