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.
I am developing an x86_64, multiboot2 compliant OS (with grub2) and testing it on Qemu. When I run it, the multiboot2 only contains tag 14 (old acpi e.g. v1) not 15 (new acpi e.g. 2.0+). The host machine is a Mac OS X late 2016 with an Intel Core i5 and should be using the new ACPI. I am running qemu with the following flags:
Ideally, I would like to see ACPI v2.0+ tables so I can use an HPET (for example). There was also no XSDT present in the RSDT. Does anyone know how to get my OS to see the new acpi information with my setup? Any help with this would be greatly appreciated.
Octocontrabass wrote:QEMU emulates an entire computer. The ACPI tables in QEMU describe the emulated hardware, not the host hardware.
How do I set the emulated hardware to include the new acpi tables in the multiboot2 header?
According to https://wiki.osdev.org/HPET#Detecting_HPET_using_ACPI: "The HPET specification defines an ACPI 2.0 table that is to be used to detect presence, address and capabilities of HPET present in the system. If this table doesn't exist, you should assume there is no HPET and you should fall back to PIT."
Ah I think I misread. So I do have an HPET. But, now acpi version 2.0+. How do I get qemu to emulate acpi version 2.0+ (i.e. tag 15 in multiboot2 header)?
zaptor wrote:I am developing an x86_64, multiboot2 compliant OS (with grub2) and testing it on Qemu. When I run it, the multiboot2 only contains tag 14 (old acpi e.g. v1) not 15 (new acpi e.g. 2.0+).
What this actually means:
Tag 14: The original RSDP that only includes a reference to the RSDT (which uses 32-bit addresses for everything); which could be used by any version of ACPI including ACPI 7.0 if the firmware doesn't feel like having an XSDT.
Tag 15: The extended RSDP that includes a reference to the RSDT (for backward compatibility with 32-bit operating systems) and a reference to an XSDT (which uses 64-bit physical addresses and probably mostly contains the same as the RSDT just with addresses "zero extended" to 64-bit to avoid avoid having 2 copies of all the tables); which could be used by any version of ACPI (except ACPI version 1.0).
Note that for ACPI tables there isn't a single "ACPI version" that applies to all tables. Each table has its own separate version number, and you can have a mixture of old and new tables (e.g. a version of the MADT that was first defined in ACPI 1.0, plus a version of the FADT that was first defined in ACPI 6.0, plus a version of other tables that were first defined in other versions of the ACPI spec).
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.