2

When the Linux kernel boots, it retrieves the ACPI tables from the system firmware. After the system has booted, I can retrieve the tables from the running kernel memory with utilities such as acpidump

Maybe this question is not really Linux specific, because other OSes have to follow some comparable procedure, but I am still interested in how the Linux kernel retrieves them from the system firmware initially. I have looked at some kernel source code but can't get a straightforward answer how this works.

5

Please see: http://wiki.osdev.org/RSDP

The first step in retrieving the ACPI tables is finding the Root System Description Pointer, or RSDP.

On UEFI systems, it is conveniently given within the EFI_SYSTEM_TABLE.

On traditional BIOS systems, two memory areas need to be searched. First, in 16-bit real mode address 0x40E there will be a 2-byte segment pointer indicating where the Extended BIOS Data Area (EBDA) is located. The RSDP could be within the first 1 KiB of EBDA, identified by the string "RSD PTR ", which is guaranteed to be located on a 16 byte boundary.

The other possible area is the main BIOS area below 1 MiB, or real-mode addresses 0x000E0000 to 0x000FFFFF.

Like all firmware (flash EEP)ROM contents, these are already copied to RAM ("shadowed") by the firmware itself for performance reasons: access to the non-volatile firmware store is usually fairly complicated and not very fast.

  • Thanks, your edit did clarify what puzzled me, I didn't knew about the shadowing part. – Eloy Dec 10 '17 at 21:32
  • Back in 1992 or so, I had a '386 system that had an option to disable BIOS shadowing. By default, shadowing was enabled and I think the consensus already was that disabling it was a bad idea unless you had a specific reason to do that, and that it would impact your BIOS/DOS performance. Since then, the performance differential between the firmware (EEP)ROM and main system RAM has only increased. – telcoM Dec 10 '17 at 21:38
  • On modern systems, the firmware builders won't even bother giving us the option to disable shadowing. – telcoM Dec 10 '17 at 21:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.