Getting ACPI SRAT and SLIT from UEFI

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
junpq
Posts: 4
Joined: Sat Feb 22, 2014 4:43 am

Getting ACPI SRAT and SLIT from UEFI

Post by junpq »

I'm using Qemu (with two virtual NUMA nodes) and OVMF to boot my UEFI bootloader which then searches through the UEFI ConfigurationTable to find a pointer to the ACPI RSDP. Both ACPIv1 and ACPIv2 checksums are fine and XsdtAddress points to a valid XSDT. Then the bootloader prints out all other SDTs and exits. The result is this:

Code: Select all

QEMU 1.1.2 monitor - type 'help' for more information
(qemu) info numa
2 nodes
node 0 cpus: 0
node 0 size: 1536 MB
node 1 cpus: 1
node 1 size: 1536 MB

Code: Select all

UEFI tells me about an ACPIv2 table at 0xBFF2D014
acpi table is fine, OEM='OVMF  '
RSDP->Revision = 2
XSDT->Length = 3C
XSDT->Signature = XSDT
SDT 'FACP' from 'OVMF  ' (len=F4) (at 00000000BFF2B000)
SDT 'APIC' from 'OVMF  ' (len=80) (at 00000000BFF2A000)
SDT 'SSDT' from 'REDHAT' (len=57) (at 00000000BFF28000)
And that's it. Just a FACP, APIC and SSDT. Qemu virtualizes two NUMA nodes, so SRAT and SLIT should be there, but how can I find them?
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Re: Getting ACPI SRAT and SLIT from UEFI

Post by jnc100 »

The ACPI tables are implemented by the firmware. When you are using OVMF as the firmware in QEMU, then you only get those tables supplied by OVMF, rather than the QEMU bios. As far as I can see, the only tables supported are those listed here.

Regards,
John.
junpq
Posts: 4
Joined: Sat Feb 22, 2014 4:43 am

Re: Getting ACPI SRAT and SLIT from UEFI

Post by junpq »

Oh, I see. Are there any alternatives to QEMU+OVMF or would I really have to buy some NUMA+UEFI hardware to test my code?
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: Getting ACPI SRAT and SLIT from UEFI

Post by pcmattman »

IIRC, VirtualBox has UEFI support. Not sure about NUMA though.
junpq
Posts: 4
Joined: Sat Feb 22, 2014 4:43 am

Re: Getting ACPI SRAT and SLIT from UEFI

Post by junpq »

I haven't found any information about NUMA virtualization in VirtualBox. Hyper-V however, is apparently able to do it. Because of that, I spent yesterday on migrating my host machine from Windows 7 (RIP) to Windows 8.1 (ugh... not a fan). Right now I'm trying to reinstall my osdev VM which is funny because the installer panics on boot due to IO-APIC timer issues. But at least the panic-logs that I could collect through Hyper-V's semi-unsupported serial ports contain some lines about SRAT tables, so I'm hopeful.
junpq
Posts: 4
Joined: Sat Feb 22, 2014 4:43 am

Re: Getting ACPI SRAT and SLIT from UEFI

Post by junpq »

Almost there: Hyper-V launches my UEFI loader and provides a nice SRAT table with all 4 virtual memory nodes and their 2 virtual processors each. However, all those entries have their "Enabled" flag set to 0. And the data is garbage (all the memory entries have Length=0). Enabling ACPI doesn't change that. What do I have to do to actually receive data from the SRAT table?
Post Reply