Skip to content

Add more APIC structure logs#5084

Closed
CookieComputing wants to merge 1 commit intoproject-oak:mainfrom
CookieComputing:add-acpi-table-logs
Closed

Add more APIC structure logs#5084
CookieComputing wants to merge 1 commit intoproject-oak:mainfrom
CookieComputing:add-acpi-table-logs

Conversation

@CookieComputing
Copy link
Copy Markdown
Contributor

Our CVMs happen to have a few extra APIC structs which would be greatly appreciated if we could get extra logs for. I've taken a look at the spec and added the struct implementations below. I've double checked the fields but let me know if I missed something!

I built this on our servers and ran it, got some of the following logs:

Before this PR

normal_structs.txt

The important logs to look at:

stage0 INFO:     Entry APIC - It is a MADT, Interrupt Controller Structures:
stage0 INFO:     -> Local APIC: ProcessorLocalApic { header: ControllerHeader { structure_type: 0, len: 8 }, processor_uid: 0, apic_id: 0, flags: LocalApicFlags(ENABLED) }
stage0 INFO:     -> Local APIC: ProcessorLocalApic { header: ControllerHeader { structure_type: 0, len: 8 }, processor_uid: 1, apic_id: 1, flags: LocalApicFlags(ENABLED) }
stage0 INFO:     -> Local APIC: ProcessorLocalApic { header: ControllerHeader { structure_type: 0, len: 8 }, processor_uid: 2, apic_id: 2, flags: LocalApicFlags(ENABLED) }
stage0 INFO:     -> Local APIC: ProcessorLocalApic { header: ControllerHeader { structure_type: 0, len: 8 }, processor_uid: 3, apic_id: 3, flags: LocalApicFlags(ENABLED) }
stage0 INFO:     -> Unknown structure, type = 1
stage0 INFO:     -> Unknown structure, type = 2
stage0 INFO:     -> Unknown structure, type = 2
stage0 INFO:     -> Unknown structure, type = 2
stage0 INFO:     -> Unknown structure, type = 2
stage0 INFO:     -> Unknown structure, type = 2
stage0 INFO:     -> Unknown structure, type = 4

After this PR

new_apic_structs.txt

The important logs to look at:

stage0 INFO:     Entry APIC - It is a MADT, Interrupt Controller Structures:
stage0 INFO:     -> Local APIC: ProcessorLocalApic { header: ControllerHeader { structure_type: 0, len: 8 }, processor_uid: 0, apic_id: 0, flags: LocalApicFlags(ENABLED) }
stage0 INFO:     -> Local APIC: ProcessorLocalApic { header: ControllerHeader { structure_type: 0, len: 8 }, processor_uid: 1, apic_id: 1, flags: LocalApicFlags(ENABLED) }
stage0 INFO:     -> Local APIC: ProcessorLocalApic { header: ControllerHeader { structure_type: 0, len: 8 }, processor_uid: 2, apic_id: 2, flags: LocalApicFlags(ENABLED) }
stage0 INFO:     -> Local APIC: ProcessorLocalApic { header: ControllerHeader { structure_type: 0, len: 8 }, processor_uid: 3, apic_id: 3, flags: LocalApicFlags(ENABLED) }
stage0 INFO:     -> I/O APIC: IoApic { header: ControllerHeader { structure_type: 1, len: 12 }, io_apic_id: 0, _reserved: 0, io_apic_addr: 4273995776, global_system_interrupt_base: 11003706212352 }
stage0 INFO:     -> Interrupt Source Override: InterruptSourceOverride { header: ControllerHeader { structure_type: 2, len: 10 }, bus: 0, source: 0, global_system_interrupt: 2, flags: 0 }
stage0 INFO:     -> Interrupt Source Override: InterruptSourceOverride { header: ControllerHeader { structure_type: 2, len: 10 }, bus: 0, source: 5, global_system_interrupt: 5, flags: 13 }
stage0 INFO:     -> Interrupt Source Override: InterruptSourceOverride { header: ControllerHeader { structure_type: 2, len: 10 }, bus: 0, source: 9, global_system_interrupt: 9, flags: 13 }
stage0 INFO:     -> Interrupt Source Override: InterruptSourceOverride { header: ControllerHeader { structure_type: 2, len: 10 }, bus: 0, source: 10, global_system_interrupt: 10, flags: 13 }
stage0 INFO:     -> Interrupt Source Override: InterruptSourceOverride { header: ControllerHeader { structure_type: 2, len: 10 }, bus: 0, source: 11, global_system_interrupt: 11, flags: 13 }
stage0 INFO:     -> Local APIC NMI: LocalApicNmi { header: ControllerHeader { structure_type: 4, len: 6 }, processor_uid: 255, flags: 0, local_apic_lint_num: 1 }

Comment thread stage0/src/acpi_tables.rs
@andrisaar
Copy link
Copy Markdown
Collaborator

Thanks!

We pulled it in as a6c2a8c so w can close this PR.

@andrisaar andrisaar closed this Mar 20, 2026
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.

2 participants