Merge patch series "Implement ACPI on aarch64"

Patrick Rudolph <patrick.rudolph@9elements.com> says:

Based on the existing work done by Simon Glass this series adds
support for booting aarch64 devices using ACPI only.
As first target QEMU SBSA support is added, which relies on ACPI
only to boot an OS. As secondary target the Raspberry Pi4 was used,
which is broadly available and allows easy testing of the proposed
solution.

The series is split into ACPI cleanups and code movements, adding
Arm specific ACPI tables and finally SoC and mainboard related
changes to boot a Linux on the QEMU SBSA and RPi4. Currently only the
mandatory ACPI tables are supported, allowing to boot into Linux
without errors.

The QEMU SBSA support is feature complete and provides the same
functionality as the EDK2 implementation.

The changes were tested on real hardware as well on QEMU v9.0:

qemu-system-aarch64 -machine sbsa-ref -nographic -cpu cortex-a57 \
                    -pflash secure-world.rom \
                    -pflash unsecure-world.rom

qemu-system-aarch64 -machine raspi4b -kernel u-boot.bin -cpu cortex-a72 \
-smp 4 -m 2G -drive file=raspbian.img,format=raw,index=0 \
-dtb bcm2711-rpi-4-b.dtb -nographic

Tested against FWTS V24.03.00.

Known issues:
- The QEMU rpi4 support is currently limited as it doesn't emulate PCI,
  USB or ethernet devices!
- The SMP bringup doesn't work on RPi4, but works in QEMU (Possibly
  cache related).
- PCI on RPI4 isn't working on real hardware since the pcie_brcmstb
  Linux kernel module doesn't support ACPI yet.

Link: https://lore.kernel.org/r/20241023132116.970117-1-patrick.rudolph@9elements.com
This commit is contained in:
Tom Rini
2024-10-27 17:14:22 -06:00
113 changed files with 6528 additions and 551 deletions

View File

@@ -315,6 +315,22 @@ config GENERATE_ACPI_TABLE
by the operating system. It defines platform-independent interfaces
for configuration and power management monitoring.
config ACPI_PARKING_PROTOCOL
bool "Support ACPI parking protocol method"
depends on GENERATE_ACPI_TABLE
depends on ARMV8_MULTIENTRY
depends on BLOBLIST_TABLES
default y if !SEC_FIRMWARE_ARMV8_PSCI && !ARMV8_PSCI
help
Say Y here to support "ACPI parking protocol" enable method
for booting Linux.
To use this feature, you must do:
- Bring secondary CPUs into U-Boot proper in a board-specific
manner. This must be done *after* relocation. Otherwise, the
secondary CPUs will spin in unprotected memory-area because the
master CPU protects the relocated spin code.
config SPL_TINY_MEMSET
bool "Use a very small memset() in SPL"
depends on SPL
@@ -988,12 +1004,15 @@ menu "System tables"
config BLOBLIST_TABLES
bool "Put tables in a bloblist"
depends on X86 && BLOBLIST
depends on BLOBLIST
default y if (ARM && EFI_LOADER && GENERATE_ACPI_TABLE)
default n
help
Normally tables are placed at address 0xf0000 and can be up to 64KB
long. With this option, tables are instead placed in the bloblist
with a pointer from 0xf0000. The size can then be larger and the
tables can be placed high in memory.
On x86 normally tables are placed at address 0xf0000 and can be up
to 64KB long. With this option, tables are instead placed in the
bloblist with a pointer from 0xf0000. The size can then be larger
and the tables can be placed high in memory.
On other architectures the tables are always placed in high memory.
config GENERATE_SMBIOS_TABLE
bool "Generate an SMBIOS (System Management BIOS) table"