diff options
| author | Tom Rini <[email protected]> | 2024-10-27 17:14:22 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-10-27 18:44:13 -0600 |
| commit | 2800aecce08b47b169d8e9824dd23b1297b2cedc (patch) | |
| tree | 2f8b61eaee1520b6fd5bd6cedb111aa3ee13f2f7 /include/dm | |
| parent | 568407fab5336c00cf0265e9de6c507078988504 (diff) | |
| parent | 25081abf081880930365ff2bc6afc6c0273ca4bf (diff) | |
Merge patch series "Implement ACPI on aarch64"
Patrick Rudolph <[email protected]> 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/[email protected]
Diffstat (limited to 'include/dm')
| -rw-r--r-- | include/dm/acpi.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/dm/acpi.h b/include/dm/acpi.h index 3adfe217678..d6bc0c099ad 100644 --- a/include/dm/acpi.h +++ b/include/dm/acpi.h @@ -147,6 +147,22 @@ struct acpi_ops { int (*write_tables)(const struct udevice *dev, struct acpi_ctx *ctx); /** + * fill_madt() - Generate MADT sub-tables for a device + * + * This is called to create the MADT table. The method should write out + * whatever sub-table is needed by this device. It will end up in the + * MADT table. + * + * Note that this is called 'fill' because the entire contents of the + * MADT is build by calling this method on all devices. + * + * @dev: Device to write + * @ctx: ACPI context to use + * @return 0 if OK, -ve on error + */ + int (*fill_madt)(const struct udevice *dev, struct acpi_ctx *ctx); + + /** * fill_ssdt() - Generate SSDT code for a device * * This is called to create the SSDT code. The method should write out @@ -232,6 +248,16 @@ int acpi_copy_name(char *out_name, const char *name); int acpi_write_dev_tables(struct acpi_ctx *ctx); /** + * acpi_fill_madt_subtbl() - Generate ACPI tables for MADT + * + * This is called to create the MADT sub-tables for all devices. + * + * @ctx: ACPI context to use + * Return: 0 if OK, -ve on error + */ +int acpi_fill_madt_subtbl(struct acpi_ctx *ctx); + +/** * acpi_fill_ssdt() - Generate ACPI tables for SSDT * * This is called to create the SSDT code for all devices. |
