mbox series

[v2,00/28] Implement ACPI on aarch64

Message ID 20240906072231.2531491-1-patrick.rudolph@9elements.com
Headers show
Series Implement ACPI on aarch64 | expand

Message

Patrick Rudolph Sept. 6, 2024, 7:22 a.m. UTC
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

Please note that the current implementation still requires a DTB to be
provided to U-Boot and that the DTB is used within U-Boot to load drivers,
to disable/enable certain hardware blocks in ACPI. The DTB is not passed
to the OS when using the bootefi cmd.

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 real hardware, but works in QEMU.
- PCI on RPI4 isn't working on real hardware since the pcie_brcmstb
  Linux kernel module doesn't support ACPI yet.

Maximilian Brune (3):
  acpi: x86: Move SPCR and DBG2 into common code
  acpi: x86: Write FADT in common code
  serial: serial_pl01x: Implement .getinfo() for PL01

Patrick Rudolph (23):
  acpi: x86: Move MADT to common code
  acpi: Fix typo
  acpi: Add define for GTDT
  arm: acpi: Add generic ACPI methods
  acpi: Add fill_madt to acpi_ops
  acpi: acpi_table: Bump revisions
  acpi: Add ACPITAB for PPTT and GTDT
  acpi: acpi_table: Add IORT support
  acpi: Move function prototype
  acpi: acpi_table: Support ACPI 2.0 platforms
  efi_loader: Install ACPI tables
  acpi: Add processor device
  drivers: usb: Add generic XHCI
  drivers: ata: Rename ahci_mvebu
  drivers/cpu: Add generic armv8 cpu driver
  common: Enable BLOBLIST_TABLES on arm
  board: emulation: Add QEMU sbsa support
  arm: mach-bcm283x: Map the ARM local MMIO as well
  arm: bcm283x: Generate ACPI tables
  arm: cpu: Add ACPI parking protocol support
  arm: mach-bcm283x: Add ARMV8_MULTIENTRY support
  arm: mach-bcm283x: Enable ARMV8_MULTIENTRY
  configs: Add RPI4 ACPI defconfig

Simon Glass (2):
  arm: mach-bcm283x: Bring in some header files from tianocore
  board: raspberrypi: Add ASL files from tianocore

 MAINTAINERS                                   |   2 +-
 arch/arm/Kconfig                              |   2 +
 arch/arm/cpu/armv8/Makefile                   |   1 +
 arch/arm/cpu/armv8/acpi_park_v8.S             | 107 ++++
 arch/arm/cpu/armv8/start.S                    |   4 +
 arch/arm/dts/qemu-sbsa.dts                    |  49 ++
 arch/arm/include/asm/acpi_table.h             | 160 +++++
 arch/arm/include/asm/arch-qemu-sbsa/boot0.h   |  33 +
 arch/arm/lib/Makefile                         |   1 +
 arch/arm/lib/acpi_table.c                     | 237 +++++++
 arch/arm/mach-bcm283x/Kconfig                 |   4 +
 arch/arm/mach-bcm283x/Makefile                |   4 +
 arch/arm/mach-bcm283x/bcm2711_acpi.c          | 149 +++++
 .../mach-bcm283x/include/mach/acpi/bcm2711.h  | 152 +++++
 .../mach-bcm283x/include/mach/acpi/bcm2836.h  | 127 ++++
 .../include/mach/acpi/bcm2836_gpio.h          |  19 +
 .../include/mach/acpi/bcm2836_gpu.h           |  47 ++
 .../include/mach/acpi/bcm2836_pwm.h           |  33 +
 .../include/mach/acpi/bcm2836_sdhost.h        |  18 +
 .../include/mach/acpi/bcm2836_sdio.h          |  21 +
 arch/arm/mach-bcm283x/init.c                  |  10 +-
 arch/arm/mach-qemu/Kconfig                    |  36 +-
 arch/sandbox/lib/Makefile                     |   9 +-
 arch/sandbox/lib/acpi_table.c                 |   7 +
 arch/x86/cpu/apollolake/acpi.c                |  20 +-
 arch/x86/cpu/baytrail/acpi.c                  |  17 +-
 arch/x86/cpu/intel_common/acpi.c              |  20 +-
 arch/x86/cpu/quark/acpi.c                     |  19 +-
 arch/x86/cpu/tangier/acpi.c                   |  31 +-
 arch/x86/include/asm/acpi_table.h             |  28 +-
 arch/x86/lib/acpi_table.c                     | 243 +-------
 board/emulation/qemu-arm/MAINTAINERS          |   2 +
 board/emulation/qemu-sbsa/Kconfig             |  56 ++
 board/emulation/qemu-sbsa/Makefile            |   8 +
 board/emulation/qemu-sbsa/acpi.c              | 244 ++++++++
 board/emulation/qemu-sbsa/dsdt.asl            | 483 +++++++++++++++
 board/emulation/qemu-sbsa/lowlevel_init.S     |  22 +
 board/emulation/qemu-sbsa/qemu-sbsa.c         | 422 +++++++++++++
 board/emulation/qemu-sbsa/qemu-sbsa.env       |  14 +
 board/emulation/qemu-sbsa/qemu-sbsa.h         |  38 ++
 board/emulation/qemu-sbsa/smc.c               |  72 +++
 board/raspberrypi/rpi/.gitignore              |   3 +
 board/raspberrypi/rpi/Makefile                |   2 +
 board/raspberrypi/rpi/acpitables.h            |  90 +++
 board/raspberrypi/rpi/dsdt.asl                | 290 +++++++++
 board/raspberrypi/rpi/emmc.asl                | 136 +++++
 board/raspberrypi/rpi/gpudevs.asl             | 372 +++++++++++
 board/raspberrypi/rpi/pci.asl                 | 177 ++++++
 board/raspberrypi/rpi/pep.asl                 |  90 +++
 board/raspberrypi/rpi/rhpx.asl                | 195 ++++++
 board/raspberrypi/rpi/rpi.c                   | 183 ++++++
 board/raspberrypi/rpi/sdhc.asl                | 111 ++++
 board/raspberrypi/rpi/uart.asl                | 208 +++++++
 boot/bootflow.c                               |   8 +-
 common/Kconfig                                |   1 +
 configs/clearfog_defconfig                    |   2 +-
 configs/clearfog_gt_8k_defconfig              |   2 +-
 configs/clearfog_sata_defconfig               |   2 +-
 configs/clearfog_spi_defconfig                |   2 +-
 configs/db-88f6820-gp_defconfig               |   2 +-
 configs/ds116_defconfig                       |   2 +-
 configs/helios4_defconfig                     |   2 +-
 configs/mvebu_crb_cn9130_defconfig            |   2 +-
 configs/mvebu_db-88f3720_defconfig            |   2 +-
 configs/mvebu_db_armada8k_defconfig           |   2 +-
 configs/mvebu_db_cn9130_defconfig             |   2 +-
 configs/mvebu_espressobin-88f3720_defconfig   |   2 +-
 .../mvebu_espressobin_ultra-88f3720_defconfig |   2 +-
 configs/mvebu_mcbin-88f8040_defconfig         |   2 +-
 configs/mvebu_puzzle-m801-88f8040_defconfig   |   2 +-
 configs/n2350_defconfig                       |   2 +-
 configs/octeon_nic23_defconfig                |   2 +-
 configs/qemu-arm-sbsa_defconfig               |  10 +
 configs/rpi_4_acpi_defconfig                  |  72 +++
 configs/turris_omnia_defconfig                |   2 +-
 doc/board/emulation/index.rst                 |   1 +
 doc/board/emulation/qemu-sbsa.rst             |  98 +++
 doc/develop/driver-model/virtio.rst           |   1 +
 drivers/ata/Kconfig                           |  12 +-
 drivers/ata/Makefile                          |   2 +-
 drivers/ata/{ahci_mvebu.c => ahci_generic.c}  |  17 +-
 drivers/core/acpi.c                           |  16 +
 drivers/cpu/Kconfig                           |   6 +
 drivers/cpu/Makefile                          |   3 +
 drivers/cpu/armv8_cpu.c                       |  90 +++
 drivers/cpu/bcm283x_cpu.c                     | 194 ++++++
 drivers/pci/pcie_brcmstb.c                    | 101 +--
 drivers/serial/serial_pl01x.c                 |  24 +
 drivers/usb/host/Kconfig                      |   8 +
 drivers/usb/host/Makefile                     |   1 +
 drivers/usb/host/xhci-generic.c               |  88 +++
 include/acpi/acpi_table.h                     | 324 +++++++++-
 include/acpi/acpigen.h                        |  12 +
 include/bloblist.h                            |   1 +
 include/configs/qemu-sbsa.h                   |  97 +++
 include/dm/acpi.h                             |  26 +
 include/serial.h                              |   1 +
 lib/Kconfig                                   |  30 +-
 lib/acpi/acpi_table.c                         | 577 ++++++++++++++++--
 lib/acpi/acpigen.c                            |  11 +
 lib/efi_loader/efi_acpi.c                     |  57 +-
 test/dm/acpi.c                                |  42 ++
 test/py/tests/test_event_dump.py              |   1 +
 103 files changed, 6262 insertions(+), 534 deletions(-)
 create mode 100644 arch/arm/cpu/armv8/acpi_park_v8.S
 create mode 100644 arch/arm/dts/qemu-sbsa.dts
 create mode 100644 arch/arm/include/asm/arch-qemu-sbsa/boot0.h
 create mode 100644 arch/arm/lib/acpi_table.c
 create mode 100644 arch/arm/mach-bcm283x/bcm2711_acpi.c
 create mode 100644 arch/arm/mach-bcm283x/include/mach/acpi/bcm2711.h
 create mode 100644 arch/arm/mach-bcm283x/include/mach/acpi/bcm2836.h
 create mode 100644 arch/arm/mach-bcm283x/include/mach/acpi/bcm2836_gpio.h
 create mode 100644 arch/arm/mach-bcm283x/include/mach/acpi/bcm2836_gpu.h
 create mode 100644 arch/arm/mach-bcm283x/include/mach/acpi/bcm2836_pwm.h
 create mode 100644 arch/arm/mach-bcm283x/include/mach/acpi/bcm2836_sdhost.h
 create mode 100644 arch/arm/mach-bcm283x/include/mach/acpi/bcm2836_sdio.h
 create mode 100644 arch/sandbox/lib/acpi_table.c
 create mode 100644 board/emulation/qemu-sbsa/Kconfig
 create mode 100644 board/emulation/qemu-sbsa/Makefile
 create mode 100644 board/emulation/qemu-sbsa/acpi.c
 create mode 100644 board/emulation/qemu-sbsa/dsdt.asl
 create mode 100644 board/emulation/qemu-sbsa/lowlevel_init.S
 create mode 100644 board/emulation/qemu-sbsa/qemu-sbsa.c
 create mode 100644 board/emulation/qemu-sbsa/qemu-sbsa.env
 create mode 100644 board/emulation/qemu-sbsa/qemu-sbsa.h
 create mode 100644 board/emulation/qemu-sbsa/smc.c
 create mode 100644 board/raspberrypi/rpi/.gitignore
 create mode 100644 board/raspberrypi/rpi/acpitables.h
 create mode 100644 board/raspberrypi/rpi/dsdt.asl
 create mode 100644 board/raspberrypi/rpi/emmc.asl
 create mode 100644 board/raspberrypi/rpi/gpudevs.asl
 create mode 100644 board/raspberrypi/rpi/pci.asl
 create mode 100644 board/raspberrypi/rpi/pep.asl
 create mode 100644 board/raspberrypi/rpi/rhpx.asl
 create mode 100644 board/raspberrypi/rpi/sdhc.asl
 create mode 100644 board/raspberrypi/rpi/uart.asl
 create mode 100644 configs/qemu-arm-sbsa_defconfig
 create mode 100644 configs/rpi_4_acpi_defconfig
 create mode 100644 doc/board/emulation/qemu-sbsa.rst
 rename drivers/ata/{ahci_mvebu.c => ahci_generic.c} (71%)
 create mode 100644 drivers/cpu/armv8_cpu.c
 create mode 100644 drivers/cpu/bcm283x_cpu.c
 create mode 100644 drivers/usb/host/xhci-generic.c
 create mode 100644 include/configs/qemu-sbsa.h

Comments

Simon Glass Sept. 6, 2024, 8 p.m. UTC | #1
Hi Patrick,

On Fri, 6 Sept 2024 at 01:22, Patrick Rudolph
<patrick.rudolph@9elements.com> wrote:
>
> 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
>
> Please note that the current implementation still requires a DTB to be

The word 'still' suggests that it won't one day. But U-Boot uses
devicetree for its configuration so this will always be the case. I
suggest removing 'still'.

> provided to U-Boot and that the DTB is used within U-Boot to load drivers,
> to disable/enable certain hardware blocks in ACPI. The DTB is not passed
> to the OS when using the bootefi cmd.
>
> 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 real hardware, but works in QEMU.
> - PCI on RPI4 isn't working on real hardware since the pcie_brcmstb
>   Linux kernel module doesn't support ACPI yet.
>
> Maximilian Brune (3):
>   acpi: x86: Move SPCR and DBG2 into common code
>   acpi: x86: Write FADT in common code
>   serial: serial_pl01x: Implement .getinfo() for PL01
>
> Patrick Rudolph (23):
>   acpi: x86: Move MADT to common code
>   acpi: Fix typo
>   acpi: Add define for GTDT
>   arm: acpi: Add generic ACPI methods
>   acpi: Add fill_madt to acpi_ops
>   acpi: acpi_table: Bump revisions
>   acpi: Add ACPITAB for PPTT and GTDT
>   acpi: acpi_table: Add IORT support
>   acpi: Move function prototype
>   acpi: acpi_table: Support ACPI 2.0 platforms
>   efi_loader: Install ACPI tables
>   acpi: Add processor device
>   drivers: usb: Add generic XHCI
>   drivers: ata: Rename ahci_mvebu
>   drivers/cpu: Add generic armv8 cpu driver
>   common: Enable BLOBLIST_TABLES on arm
>   board: emulation: Add QEMU sbsa support
>   arm: mach-bcm283x: Map the ARM local MMIO as well
>   arm: bcm283x: Generate ACPI tables
>   arm: cpu: Add ACPI parking protocol support
>   arm: mach-bcm283x: Add ARMV8_MULTIENTRY support
>   arm: mach-bcm283x: Enable ARMV8_MULTIENTRY
>   configs: Add RPI4 ACPI defconfig
>
> Simon Glass (2):
>   arm: mach-bcm283x: Bring in some header files from tianocore
>   board: raspberrypi: Add ASL files from tianocore
>
>  MAINTAINERS                                   |   2 +-
>  arch/arm/Kconfig                              |   2 +
>  arch/arm/cpu/armv8/Makefile                   |   1 +
>  arch/arm/cpu/armv8/acpi_park_v8.S             | 107 ++++
>  arch/arm/cpu/armv8/start.S                    |   4 +
>  arch/arm/dts/qemu-sbsa.dts                    |  49 ++
>  arch/arm/include/asm/acpi_table.h             | 160 +++++
>  arch/arm/include/asm/arch-qemu-sbsa/boot0.h   |  33 +
>  arch/arm/lib/Makefile                         |   1 +
>  arch/arm/lib/acpi_table.c                     | 237 +++++++
>  arch/arm/mach-bcm283x/Kconfig                 |   4 +
>  arch/arm/mach-bcm283x/Makefile                |   4 +
>  arch/arm/mach-bcm283x/bcm2711_acpi.c          | 149 +++++
>  .../mach-bcm283x/include/mach/acpi/bcm2711.h  | 152 +++++
>  .../mach-bcm283x/include/mach/acpi/bcm2836.h  | 127 ++++
>  .../include/mach/acpi/bcm2836_gpio.h          |  19 +
>  .../include/mach/acpi/bcm2836_gpu.h           |  47 ++
>  .../include/mach/acpi/bcm2836_pwm.h           |  33 +
>  .../include/mach/acpi/bcm2836_sdhost.h        |  18 +
>  .../include/mach/acpi/bcm2836_sdio.h          |  21 +
>  arch/arm/mach-bcm283x/init.c                  |  10 +-
>  arch/arm/mach-qemu/Kconfig                    |  36 +-
>  arch/sandbox/lib/Makefile                     |   9 +-
>  arch/sandbox/lib/acpi_table.c                 |   7 +
>  arch/x86/cpu/apollolake/acpi.c                |  20 +-
>  arch/x86/cpu/baytrail/acpi.c                  |  17 +-
>  arch/x86/cpu/intel_common/acpi.c              |  20 +-
>  arch/x86/cpu/quark/acpi.c                     |  19 +-
>  arch/x86/cpu/tangier/acpi.c                   |  31 +-
>  arch/x86/include/asm/acpi_table.h             |  28 +-
>  arch/x86/lib/acpi_table.c                     | 243 +-------
>  board/emulation/qemu-arm/MAINTAINERS          |   2 +
>  board/emulation/qemu-sbsa/Kconfig             |  56 ++
>  board/emulation/qemu-sbsa/Makefile            |   8 +
>  board/emulation/qemu-sbsa/acpi.c              | 244 ++++++++
>  board/emulation/qemu-sbsa/dsdt.asl            | 483 +++++++++++++++
>  board/emulation/qemu-sbsa/lowlevel_init.S     |  22 +
>  board/emulation/qemu-sbsa/qemu-sbsa.c         | 422 +++++++++++++
>  board/emulation/qemu-sbsa/qemu-sbsa.env       |  14 +
>  board/emulation/qemu-sbsa/qemu-sbsa.h         |  38 ++
>  board/emulation/qemu-sbsa/smc.c               |  72 +++
>  board/raspberrypi/rpi/.gitignore              |   3 +
>  board/raspberrypi/rpi/Makefile                |   2 +
>  board/raspberrypi/rpi/acpitables.h            |  90 +++
>  board/raspberrypi/rpi/dsdt.asl                | 290 +++++++++
>  board/raspberrypi/rpi/emmc.asl                | 136 +++++
>  board/raspberrypi/rpi/gpudevs.asl             | 372 +++++++++++
>  board/raspberrypi/rpi/pci.asl                 | 177 ++++++
>  board/raspberrypi/rpi/pep.asl                 |  90 +++
>  board/raspberrypi/rpi/rhpx.asl                | 195 ++++++
>  board/raspberrypi/rpi/rpi.c                   | 183 ++++++
>  board/raspberrypi/rpi/sdhc.asl                | 111 ++++
>  board/raspberrypi/rpi/uart.asl                | 208 +++++++
>  boot/bootflow.c                               |   8 +-
>  common/Kconfig                                |   1 +
>  configs/clearfog_defconfig                    |   2 +-
>  configs/clearfog_gt_8k_defconfig              |   2 +-
>  configs/clearfog_sata_defconfig               |   2 +-
>  configs/clearfog_spi_defconfig                |   2 +-
>  configs/db-88f6820-gp_defconfig               |   2 +-
>  configs/ds116_defconfig                       |   2 +-
>  configs/helios4_defconfig                     |   2 +-
>  configs/mvebu_crb_cn9130_defconfig            |   2 +-
>  configs/mvebu_db-88f3720_defconfig            |   2 +-
>  configs/mvebu_db_armada8k_defconfig           |   2 +-
>  configs/mvebu_db_cn9130_defconfig             |   2 +-
>  configs/mvebu_espressobin-88f3720_defconfig   |   2 +-
>  .../mvebu_espressobin_ultra-88f3720_defconfig |   2 +-
>  configs/mvebu_mcbin-88f8040_defconfig         |   2 +-
>  configs/mvebu_puzzle-m801-88f8040_defconfig   |   2 +-
>  configs/n2350_defconfig                       |   2 +-
>  configs/octeon_nic23_defconfig                |   2 +-
>  configs/qemu-arm-sbsa_defconfig               |  10 +
>  configs/rpi_4_acpi_defconfig                  |  72 +++
>  configs/turris_omnia_defconfig                |   2 +-
>  doc/board/emulation/index.rst                 |   1 +
>  doc/board/emulation/qemu-sbsa.rst             |  98 +++
>  doc/develop/driver-model/virtio.rst           |   1 +
>  drivers/ata/Kconfig                           |  12 +-
>  drivers/ata/Makefile                          |   2 +-
>  drivers/ata/{ahci_mvebu.c => ahci_generic.c}  |  17 +-
>  drivers/core/acpi.c                           |  16 +
>  drivers/cpu/Kconfig                           |   6 +
>  drivers/cpu/Makefile                          |   3 +
>  drivers/cpu/armv8_cpu.c                       |  90 +++
>  drivers/cpu/bcm283x_cpu.c                     | 194 ++++++
>  drivers/pci/pcie_brcmstb.c                    | 101 +--
>  drivers/serial/serial_pl01x.c                 |  24 +
>  drivers/usb/host/Kconfig                      |   8 +
>  drivers/usb/host/Makefile                     |   1 +
>  drivers/usb/host/xhci-generic.c               |  88 +++
>  include/acpi/acpi_table.h                     | 324 +++++++++-
>  include/acpi/acpigen.h                        |  12 +
>  include/bloblist.h                            |   1 +
>  include/configs/qemu-sbsa.h                   |  97 +++
>  include/dm/acpi.h                             |  26 +
>  include/serial.h                              |   1 +
>  lib/Kconfig                                   |  30 +-
>  lib/acpi/acpi_table.c                         | 577 ++++++++++++++++--
>  lib/acpi/acpigen.c                            |  11 +
>  lib/efi_loader/efi_acpi.c                     |  57 +-
>  test/dm/acpi.c                                |  42 ++
>  test/py/tests/test_event_dump.py              |   1 +
>  103 files changed, 6262 insertions(+), 534 deletions(-)
>  create mode 100644 arch/arm/cpu/armv8/acpi_park_v8.S
>  create mode 100644 arch/arm/dts/qemu-sbsa.dts
>  create mode 100644 arch/arm/include/asm/arch-qemu-sbsa/boot0.h
>  create mode 100644 arch/arm/lib/acpi_table.c
>  create mode 100644 arch/arm/mach-bcm283x/bcm2711_acpi.c
>  create mode 100644 arch/arm/mach-bcm283x/include/mach/acpi/bcm2711.h
>  create mode 100644 arch/arm/mach-bcm283x/include/mach/acpi/bcm2836.h
>  create mode 100644 arch/arm/mach-bcm283x/include/mach/acpi/bcm2836_gpio.h
>  create mode 100644 arch/arm/mach-bcm283x/include/mach/acpi/bcm2836_gpu.h
>  create mode 100644 arch/arm/mach-bcm283x/include/mach/acpi/bcm2836_pwm.h
>  create mode 100644 arch/arm/mach-bcm283x/include/mach/acpi/bcm2836_sdhost.h
>  create mode 100644 arch/arm/mach-bcm283x/include/mach/acpi/bcm2836_sdio.h
>  create mode 100644 arch/sandbox/lib/acpi_table.c
>  create mode 100644 board/emulation/qemu-sbsa/Kconfig
>  create mode 100644 board/emulation/qemu-sbsa/Makefile
>  create mode 100644 board/emulation/qemu-sbsa/acpi.c
>  create mode 100644 board/emulation/qemu-sbsa/dsdt.asl
>  create mode 100644 board/emulation/qemu-sbsa/lowlevel_init.S
>  create mode 100644 board/emulation/qemu-sbsa/qemu-sbsa.c
>  create mode 100644 board/emulation/qemu-sbsa/qemu-sbsa.env
>  create mode 100644 board/emulation/qemu-sbsa/qemu-sbsa.h
>  create mode 100644 board/emulation/qemu-sbsa/smc.c
>  create mode 100644 board/raspberrypi/rpi/.gitignore
>  create mode 100644 board/raspberrypi/rpi/acpitables.h
>  create mode 100644 board/raspberrypi/rpi/dsdt.asl
>  create mode 100644 board/raspberrypi/rpi/emmc.asl
>  create mode 100644 board/raspberrypi/rpi/gpudevs.asl
>  create mode 100644 board/raspberrypi/rpi/pci.asl
>  create mode 100644 board/raspberrypi/rpi/pep.asl
>  create mode 100644 board/raspberrypi/rpi/rhpx.asl
>  create mode 100644 board/raspberrypi/rpi/sdhc.asl
>  create mode 100644 board/raspberrypi/rpi/uart.asl
>  create mode 100644 configs/qemu-arm-sbsa_defconfig
>  create mode 100644 configs/rpi_4_acpi_defconfig
>  create mode 100644 doc/board/emulation/qemu-sbsa.rst
>  rename drivers/ata/{ahci_mvebu.c => ahci_generic.c} (71%)
>  create mode 100644 drivers/cpu/armv8_cpu.c
>  create mode 100644 drivers/cpu/bcm283x_cpu.c
>  create mode 100644 drivers/usb/host/xhci-generic.c
>  create mode 100644 include/configs/qemu-sbsa.h
>
> --
> 2.45.2
>

Regards,
Simon
Tom Rini Sept. 6, 2024, 8:41 p.m. UTC | #2
On Fri, Sep 06, 2024 at 02:00:57PM -0600, Simon Glass wrote:
> Hi Patrick,
> 
> On Fri, 6 Sept 2024 at 01:22, Patrick Rudolph
> <patrick.rudolph@9elements.com> wrote:
> >
> > 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
> >
> > Please note that the current implementation still requires a DTB to be
> 
> The word 'still' suggests that it won't one day. But U-Boot uses
> devicetree for its configuration so this will always be the case. I
> suggest removing 'still'.

Pointing over at x86 where we have dts files, yes, please remove the
word "still" and perhaps otherwise reword a few things. U-Boot is happy
to pass along ACPI and so forth to the OS, but will continue using
device tree internally.