Page 1 of 1

Getting ACPI SRAT and SLIT from UEFI

Posted: Sat Feb 22, 2014 5:15 am
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?

Re: Getting ACPI SRAT and SLIT from UEFI

Posted: Sat Feb 22, 2014 8:03 am
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.

Re: Getting ACPI SRAT and SLIT from UEFI

Posted: Sun Feb 23, 2014 3:37 am
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?

Re: Getting ACPI SRAT and SLIT from UEFI

Posted: Sun Feb 23, 2014 11:31 pm
by pcmattman
IIRC, VirtualBox has UEFI support. Not sure about NUMA though.

Re: Getting ACPI SRAT and SLIT from UEFI

Posted: Mon Feb 24, 2014 10:50 am
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.

Re: Getting ACPI SRAT and SLIT from UEFI

Posted: Fri Mar 21, 2014 12:46 pm
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?