Hi Arthur,
On 08.11.23 18:17, Arthur Heymans wrote:
On ARM server platforms the 'preferred' way of informing the OS is via UEFI, ACPI and SMBIOS. There is some rationale on why: https://www.kernel.org/doc/Documentation/arm64/arm-acpi.txt TL;DR: "if you want to run an old kernel with new hardware ACPI could be a better solution than devicetree".
just a side note: For somebody working for a company that has used old kernels on new hardware, this seems like a weak argument. I actually remember more causes of trouble due to ACPI (and missing related changes in the kernel). Chances that things really work multiplied by the chances that somebody really needs such a setup seem pretty low. So until I hear about some success stories, I'll consider it an empty argument.
Both the UEFI and ACPI spec are wild beasts to tame (with many pages) so ARM came up with essentially a TL;DR of that spec which is called Server Base Boot Requirements ( https://documentation-service.arm.com/static/63cfe3aee4378a55c5e03d96?token= ).
Now on a lot of existing ARM server platforms TF-A exists as 'full' solution. Currently the SBBR is satisfied by adding a EDK2 or other proprietary UEFI solution that gets loaded by TF-A. Not everyone likes these UEFI implementations as they are big and well... not so nice. So the idea came up to lighten that part of the burden (implementing tables and loading the OS): use coreboot to generate ACPI and SMBIOS (well supported on x86 and small changes needed for ARM), implement a small UEFI (e.g. with libpayload, just enough to load Linux from flash) to get a lightweight LinuxBoot firmware.
When I read below that TF-A hands off FDT, I thought this is fascinating. Do you need any other input to generate ACPI and SMBIOS? I have some idea in mind since FDT in coreboot was first discussed during OSFC 2022: Clear coreboot from ACPI and produce FDT instead. And for OSs that prefer ACPI, have a separate stage that translates things. Didn't think about it, but with SMBIOS it's quite the same. So eventually that would be something that translates FDT --> ACPI, SMBIOS. Basically what you described for ARM64.
Do you have any platform code / coreboot "port" published yet? Could help to get an overview of what is needed :)
Cheers, Nico