]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
arm64: acpi: Enable ACPI CCEL support
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Thu, 18 Sep 2025 12:56:18 +0000 (13:56 +0100)
committerWill Deacon <will@kernel.org>
Fri, 19 Sep 2025 09:12:02 +0000 (10:12 +0100)
Add support for ACPI CCEL by handling the EfiACPIMemoryNVS type memory.
As per UEFI specifications NVS memory is reserved for Firmware use even
after exiting boot services. Thus map the region as read-only.

Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@kernel.org>
Cc: Steven Price <steven.price@arm.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Gavin Shan <gshan@redhat.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Tested-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/acpi.c

index 4d529ff7ba513a5b422fedef5720cdb80829e547..b3195b3b895faee10f7700da3591a665f0ddc1f7 100644 (file)
@@ -357,6 +357,16 @@ void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
                         * as long as we take care not to create a writable
                         * mapping for executable code.
                         */
+                       fallthrough;
+
+               case EFI_ACPI_MEMORY_NVS:
+                       /*
+                        * ACPI NVS marks an area reserved for use by the
+                        * firmware, even after exiting the boot service.
+                        * This may be used by the firmware for sharing dynamic
+                        * tables/data (e.g., ACPI CCEL) with the OS. Map it
+                        * as read-only.
+                        */
                        prot = PAGE_KERNEL_RO;
                        break;