summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPatrick Rudolph <[email protected]>2024-10-23 15:20:13 +0200
committerTom Rini <[email protected]>2024-10-27 17:24:13 -0600
commit34bfe8eff895b864247d923ce37110a9053592ee (patch)
tree627a145bd5527c6693b6a326dcf3cfb6badeccb2 /include
parent2f3b679298903c6ce5169953dfe7e08ffeadc3b9 (diff)
arm: cpu: Add ACPI parking protocol support
On Arm platforms that use ACPI they cannot rely on the "spin-table" CPU bringup usually defined in the FDT. Thus implement the 'ACPI Multi-processor Startup for ARM Platforms', also referred to as 'ACPI parking protocol'. The ACPI parking protocol works similar to the spin-table mechanism, but the specification also covers lots of shortcomings of the spin-table implementations. Every CPU defined in the ACPI MADT table has it's own 4K page where the spinloop code and the OS mailbox resides. When selected the U-Boot board code must make sure that the secondary CPUs enter u-boot after relocation as well, so that they can enter the spinloop code residing in the ACPI parking protocol pages. The OS will then write to the mailbox and generate an IPI to release the CPUs from the spinloop code. For now it's only implemented on ARMv8, but can easily be extended to other platforms, like ARMv7. TEST: Boots all CPUs on qemu-system-aarch64 -machine raspi4b Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Simon Glass <[email protected]> Cc: Simon Glass <[email protected]> Cc: Tom Rini <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acpi_table.h10
-rw-r--r--include/bloblist.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h
index 07c5f65d753..b8b1f1338c6 100644
--- a/include/acpi/acpi_table.h
+++ b/include/acpi/acpi_table.h
@@ -1238,6 +1238,16 @@ int acpi_iort_add_smmu_v3(struct acpi_ctx *ctx,
void *acpi_fill_madt(struct acpi_madt *madt, struct acpi_ctx *ctx);
/**
+ * acpi_write_park() - Installs the ACPI parking protocol.
+ *
+ * Sets up the ACPI parking protocol and installs the spinning code for
+ * secondary CPUs.
+ *
+ * @madt: The MADT to update
+ */
+void acpi_write_park(struct acpi_madt *madt);
+
+/**
* acpi_get_rsdp_addr() - get ACPI RSDP table address
*
* This routine returns the ACPI RSDP table address in the system memory.
diff --git a/include/bloblist.h b/include/bloblist.h
index b0706b5637d..ff32d3fecfd 100644
--- a/include/bloblist.h
+++ b/include/bloblist.h
@@ -110,6 +110,7 @@ enum bloblist_tag_t {
BLOBLISTT_ACPI_TABLES = 4,
BLOBLISTT_TPM_EVLOG = 5,
BLOBLISTT_TPM_CRB_BASE = 6,
+ BLOBLISTT_ACPI_PP = 7,
/* Standard area to allocate blobs used across firmware components */
BLOBLISTT_AREA_FIRMWARE = 0x10,