]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Merge patch series "Implement ACPI on aarch64"
authorTom Rini <trini@konsulko.com>
Sun, 27 Oct 2024 23:14:22 +0000 (17:14 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 28 Oct 2024 00:44:13 +0000 (18:44 -0600)
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
31 files changed:
1  2 
.azure-pipelines.yml
.gitlab-ci.yml
MAINTAINERS
arch/arm/cpu/armv8/Makefile
arch/arm/cpu/armv8/start.S
arch/arm/lib/Makefile
arch/sandbox/dts/test.dts
common/Kconfig
common/bloblist.c
configs/clearfog_defconfig
configs/clearfog_gt_8k_defconfig
configs/clearfog_sata_defconfig
configs/clearfog_spi_defconfig
configs/db-88f6820-gp_defconfig
configs/ds116_defconfig
configs/helios4_defconfig
configs/mvebu_crb_cn9130_defconfig
configs/mvebu_db-88f3720_defconfig
configs/mvebu_db_armada8k_defconfig
configs/mvebu_db_cn9130_defconfig
configs/mvebu_espressobin-88f3720_defconfig
configs/mvebu_espressobin_ultra-88f3720_defconfig
configs/mvebu_mcbin-88f8040_defconfig
configs/mvebu_puzzle-m801-88f8040_defconfig
configs/n2350_defconfig
configs/octeon_nic23_defconfig
configs/turris_omnia_defconfig
drivers/ata/Makefile
drivers/usb/host/Makefile
include/serial.h
lib/Kconfig

index 3ff1b44a6bcb98daa417b51acd7da6c50efffec1,2881851ecf3b5eb294146eaeff14219c46919e4e..4ecf76eaa0b5c66de15bc9e4779fefbb3d30af96
@@@ -423,9 -420,9 +428,12 @@@ stages
          qemu_arm64:
            TEST_PY_BD: "qemu_arm64"
            TEST_PY_TEST_SPEC: "not sleep"
 +        qemu_arm64_lwip:
 +          TEST_PY_BD: "qemu_arm64_lwip"
 +          TEST_PY_TEST_SPEC: "test_net_dhcp or test_net_ping or test_net_tftpboot"
+         qemu_arm_sbsa_ref:
+           TEST_PY_BD: "qemu-arm-sbsa"
+           TEST_PY_TEST_SPEC: "not sleep"
          qemu_m68k:
            TEST_PY_BD: "M5208EVBE"
            TEST_PY_ID: "--id qemu"
diff --cc .gitlab-ci.yml
index d89657e28b314a2fb275b623a70b342d7344bb92,3f02a492d52d8785bb75a0ce0f633c64620facef..0aeda53bc2d2a1fd612e973a0bcfcd2c3e6b3f5e
@@@ -42,6 -39,11 +42,11 @@@ stages
          wget -O - https://github.com/riscv-software-src/opensbi/releases/download/v1.3.1/opensbi-1.3.1-rv-bin.tar.xz | tar -C /tmp -xJ;
          export OPENSBI=/tmp/opensbi-1.3.1-rv-bin/share/opensbi/lp64/generic/firmware/fw_dynamic.bin;
        fi
 -        export BINMAN_INDIRS=/tmp
+     - if [[ "${TEST_PY_BD}" == "qemu-arm-sbsa" ]]; then
+         wget -O /tmp/bl1.bin https://artifacts.codelinaro.org/artifactory/linaro-419-sbsa-ref/latest/tf-a/bl1.bin;
+         wget -O /tmp/fip.bin https://artifacts.codelinaro.org/artifactory/linaro-419-sbsa-ref/latest/tf-a/fip.bin;
++        export BINMAN_INDIRS=/tmp;
+       fi
  
    after_script:
      - cp -v /tmp/${TEST_PY_BD}/*.{html,css,xml} .
@@@ -351,12 -349,12 +356,18 @@@ qemu_arm64 test.py
      TEST_PY_TEST_SPEC: "not sleep"
    <<: *buildman_and_testpy_dfn
  
 +qemu_arm64_lwip test.py:
 +  variables:
 +    TEST_PY_BD: "qemu_arm64_lwip"
 +    TEST_PY_TEST_SPEC: "test_net_dhcp or test_net_ping or test_net_tftpboot"
 +  <<: *buildman_and_testpy_dfn
 +
+ qemu_arm_sbsa test.py:
+   variables:
+     TEST_PY_BD: "qemu-arm-sbsa"
+     TEST_PY_TEST_SPEC: "not sleep"
+   <<: *buildman_and_testpy_dfn
  qemu_m68k test.py:
    variables:
      TEST_PY_BD: "M5208EVBE"
diff --cc MAINTAINERS
Simple merge
index 8747d2eb1862d4985c81f8a820f648b5e16c214c,4f4368ff8c7b42fd9ce023969edc04ca791b4ea0..2e71ff2dc97ae53a021d45172d49566de0069828
@@@ -27,8 -27,9 +27,9 @@@ endi
  obj-y += cpu-dt.o
  obj-$(CONFIG_ARM_SMCCC)               += smccc-call.o
  
 -ifndef CONFIG_SPL_BUILD
 +ifndef CONFIG_XPL_BUILD
  obj-$(CONFIG_ARMV8_SPIN_TABLE) += spin_table.o spin_table_v8.o
+ obj-$(CONFIG_ACPI_PARKING_PROTOCOL) += acpi_park_v8.o
  else
  obj-$(CONFIG_ARCH_SUNXI) += fel_utils.o
  endif
Simple merge
Simple merge
Simple merge
diff --cc common/Kconfig
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc lib/Kconfig
Simple merge