]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
acpi: use U-Boot ACPI vendor ID
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 31 Oct 2025 19:52:53 +0000 (20:52 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 6 Nov 2025 14:30:33 +0000 (08:30 -0600)
The U-Boot project has been assigned the vendor ID 'UBOO' [1]. Use this
vendor ID and our release version in the ACPI table headers.

[1] ACPI ID Registry
    https://uefi.org/ACPI_ID_List

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/lib/acpi_nhlt.c
arch/x86/lib/acpi_table.c
include/acpi/acpi_table.h
lib/acpi/acpi_table.c
test/dm/acpi.c

index 8aae5fa5af76e6fd2e3de661d0e75c1e1a3af9d0..4ffce589d7abfe4566821f90b5538656cae349eb 100644 (file)
@@ -408,7 +408,7 @@ int nhlt_serialise_oem_overrides(struct acpi_ctx *ctx, struct nhlt *nhlt,
                memcpy(header->oem_table_id, oem_table_id, oem_table_id_len);
        }
        header->oem_revision = oem_revision;
-       memcpy(header->creator_id, ASLC_ID, 4);
+       memcpy(header->creator_id, ACPI_CREATOR_ID, 4);
 
        cur.buf = (void *)(header + 1);
        cur.start = (void *)header;
index b13292c4150c0fe486cbe805d9073b098026c90e..6bd7ad799bfba29440296fac15133911f14b2fc7 100644 (file)
@@ -224,7 +224,7 @@ static int acpi_write_tpm2(struct acpi_ctx *ctx,
 
        /* Fill out header fields. */
        acpi_fill_header(header, "TPM2");
-       memcpy(header->creator_id, ASLC_ID, 4);
+       memcpy(header->creator_id, ACPI_CREATOR_ID, 4);
 
        header->length = sizeof(struct acpi_tpm2);
        header->revision = acpi_get_table_revision(ACPITAB_TPM2);
index 05b6385544e3e92a6bbe9844f7dd6db38420f9a4..4895366a6188ec61d974da4d3081b3eebbfa498f 100644 (file)
 #ifndef __ACPI_TABLE_H__
 #define __ACPI_TABLE_H__
 
+#include <version.h>
 #include <dm/acpi.h>
 
 #define RSDP_SIG               "RSD PTR "      /* RSDP pointer signature */
 #define OEM_ID                 "U-BOOT"        /* U-Boot */
 #define OEM_TABLE_ID           "U-BOOTBL"      /* U-Boot Table */
-#define ASLC_ID                        "INTL"          /* Intel ASL Compiler */
 
-/* TODO(sjg@chromium.org): Figure out how to get compiler revision */
-#define ASL_REVISION   0
+/**
+ * define ACPI_CREATOR_ID - ACPI creator ID
+ *
+ * This is the ACPI assigned vendor ID for the U-Boot project.
+ * It is used in the ACPI tables created by U-Boot.
+ */
+#define ACPI_CREATOR_ID                "UBOO"
+
+/**
+ * define ACPI_CREATOR_REVISION - ACPI creator ID
+ *
+ * This encodes the U-Boot version.
+ * It is used in the ACPI tables created by U-Boot.
+ */
+#define ACPI_CREATOR_REVISION \
+       (U_BOOT_VERSION_NUM << 4 | U_BOOT_VERSION_NUM_PATCH)
 
 #define ACPI_RSDP_REV_ACPI_1_0 0
 #define ACPI_RSDP_REV_ACPI_2_0 2
index 43b7118213338037191cefa6391fd86d7c332608..52b05efd62d38d7f79d5fe0d48cf874a4f46b09f 100644 (file)
@@ -134,8 +134,8 @@ void acpi_fill_header(struct acpi_table_header *header, char *signature)
        memcpy(header->oem_id, OEM_ID, 6);
        memcpy(header->oem_table_id, OEM_TABLE_ID, 8);
        header->oem_revision = OEM_REVISION;
-       memcpy(header->creator_id, ASLC_ID, 4);
-       header->creator_revision = ASL_REVISION;
+       memcpy(header->creator_id, ACPI_CREATOR_ID, 4);
+       header->creator_revision = ACPI_CREATOR_REVISION;
 }
 
 void acpi_align(struct acpi_ctx *ctx)
@@ -248,7 +248,7 @@ int acpi_write_fadt(struct acpi_ctx *ctx, const struct acpi_writer *entry)
        header->revision = acpi_get_table_revision(ACPITAB_FADT);
        memcpy(header->oem_id, OEM_ID, 6);
        memcpy(header->oem_table_id, OEM_TABLE_ID, 8);
-       memcpy(header->creator_id, ASLC_ID, 4);
+       memcpy(header->creator_id, ACPI_CREATOR_ID, 4);
        header->creator_revision = 1;
        fadt->minor_revision = 2;
 
index db012b6d2f1b66d7c8c787a165f982e40320df1a..559ea269de202caa32d0a18f5dfbf90a9cc62430 100644 (file)
@@ -261,8 +261,8 @@ static int dm_test_acpi_fill_header(struct unit_test_state *uts)
        ut_asserteq_mem(OEM_TABLE_ID, hdr.oem_table_id,
                        sizeof(hdr.oem_table_id));
        ut_asserteq(OEM_REVISION, hdr.oem_revision);
-       ut_asserteq_mem(ASLC_ID, hdr.creator_id, sizeof(hdr.creator_id));
-       ut_asserteq(ASL_REVISION, hdr.creator_revision);
+       ut_asserteq_mem(ACPI_CREATOR_ID, hdr.creator_id, sizeof(hdr.creator_id));
+       ut_asserteq(ACPI_CREATOR_REVISION, hdr.creator_revision);
 
        return 0;
 }
@@ -415,22 +415,27 @@ static int dm_test_acpi_cmd_list(struct unit_test_state *uts)
        ut_assert_nextline("RSDP  %16lx  %5zx  v02 U-BOOT", addr,
                           sizeof(struct acpi_rsdp));
        addr = ALIGN(addr + sizeof(struct acpi_rsdp), 16);
-       ut_assert_nextline("RSDT  %16lx  %5zx  v01 U-BOOT U-BOOTBL %x INTL 0",
+       ut_assert_nextline("RSDT  %16lx  %5zx  v01 U-BOOT U-BOOTBL %x UBOO %x",
                           addr, sizeof(struct acpi_table_header) +
-                          3 * sizeof(u32), OEM_REVISION);
+                          3 * sizeof(u32), OEM_REVISION,
+                          ACPI_CREATOR_REVISION);
        addr = ALIGN(addr + sizeof(struct acpi_rsdt), 16);
-       ut_assert_nextline("XSDT  %16lx  %5zx  v01 U-BOOT U-BOOTBL %x INTL 0",
+       ut_assert_nextline("XSDT  %16lx  %5zx  v01 U-BOOT U-BOOTBL %x UBOO %x",
                           addr, sizeof(struct acpi_table_header) +
-                          3 * sizeof(u64), OEM_REVISION);
+                          3 * sizeof(u64), OEM_REVISION,
+                          ACPI_CREATOR_REVISION);
        addr = ALIGN(addr + sizeof(struct acpi_xsdt), 64);
-       ut_assert_nextline("DMAR  %16lx  %5zx  v01 U-BOOT U-BOOTBL %x INTL 0",
-                          addr, sizeof(struct acpi_dmar), OEM_REVISION);
+       ut_assert_nextline("DMAR  %16lx  %5zx  v01 U-BOOT U-BOOTBL %x UBOO %x",
+                          addr, sizeof(struct acpi_dmar), OEM_REVISION,
+                          ACPI_CREATOR_REVISION);
        addr = ALIGN(addr + sizeof(struct acpi_dmar), 16);
-       ut_assert_nextline("DMAR  %16lx  %5zx  v01 U-BOOT U-BOOTBL %x INTL 0",
-                          addr, sizeof(struct acpi_dmar), OEM_REVISION);
+       ut_assert_nextline("DMAR  %16lx  %5zx  v01 U-BOOT U-BOOTBL %x UBOO %x",
+                          addr, sizeof(struct acpi_dmar), OEM_REVISION,
+                          ACPI_CREATOR_REVISION);
        addr = ALIGN(addr + sizeof(struct acpi_dmar), 16);
-       ut_assert_nextline("DMAR  %16lx  %5zx  v01 U-BOOT U-BOOTBL %x INTL 0",
-                          addr, sizeof(struct acpi_dmar), OEM_REVISION);
+       ut_assert_nextline("DMAR  %16lx  %5zx  v01 U-BOOT U-BOOTBL %x UBOO %x",
+                          addr, sizeof(struct acpi_dmar), OEM_REVISION,
+                          ACPI_CREATOR_REVISION);
        ut_assert_console_end();
        unmap_sysmem(buf);
        free(buf);
@@ -459,23 +464,27 @@ static int dm_test_acpi_cmd_list_chksum(struct unit_test_state *uts)
        ut_assert_nextline("RSDP  %16lx  %5zx  v02 U-BOOT  OK  OK", addr,
                           sizeof(struct acpi_rsdp));
        addr = ALIGN(addr + sizeof(struct acpi_rsdp), 16);
-       ut_assert_nextline("RSDT  %16lx  %5zx  v01 U-BOOT U-BOOTBL %x INTL 0  OK",
+       ut_assert_nextline("RSDT  %16lx  %5zx  v01 U-BOOT U-BOOTBL %x UBOO %x  OK",
                           addr, sizeof(struct acpi_table_header) +
-                          3 * sizeof(u32), OEM_REVISION);
+                          3 * sizeof(u32), OEM_REVISION,
+                          ACPI_CREATOR_REVISION);
        addr = ALIGN(addr + sizeof(struct acpi_rsdt), 16);
-       ut_assert_nextline("XSDT  %16lx  %5zx  v01 U-BOOT U-BOOTBL %x INTL 0  OK",
+       ut_assert_nextline("XSDT  %16lx  %5zx  v01 U-BOOT U-BOOTBL %x UBOO %x  OK",
                           addr, sizeof(struct acpi_table_header) +
-                          3 * sizeof(u64), OEM_REVISION);
+                          3 * sizeof(u64), OEM_REVISION,
+                          ACPI_CREATOR_REVISION);
        addr = ALIGN(addr + sizeof(struct acpi_xsdt), 64);
-       ut_assert_nextline("DMAR  %16lx  %5zx  v01 U-BOOT U-BOOTBL %x INTL 0  OK",
-                          addr, sizeof(struct acpi_dmar), OEM_REVISION);
+       ut_assert_nextline("DMAR  %16lx  %5zx  v01 U-BOOT U-BOOTBL %x UBOO %x  OK",
+                          addr, sizeof(struct acpi_dmar), OEM_REVISION,
+                          ACPI_CREATOR_REVISION);
        addr = ALIGN(addr + sizeof(struct acpi_dmar), 16);
-       ut_assert_nextline("DMAR  %16lx  %5zx  v01 U-BOOT U-BOOTBL %x INTL 0  OK",
-                          addr, sizeof(struct acpi_dmar), OEM_REVISION);
+       ut_assert_nextline("DMAR  %16lx  %5zx  v01 U-BOOT U-BOOTBL %x UBOO %x  OK",
+                          addr, sizeof(struct acpi_dmar), OEM_REVISION,
+                          ACPI_CREATOR_REVISION);
        addr = ALIGN(addr + sizeof(struct acpi_dmar), 16);
-       ut_assert_nextline("DMAR  %16lx  %5zx  v01 U-BOOT U-BOOTBL %x INTL 0  OK",
-                          addr, sizeof(struct acpi_dmar), OEM_REVISION);
-       ut_assert_console_end();
+       ut_assert_nextline("DMAR  %16lx  %5zx  v01 U-BOOT U-BOOTBL %x UBOO %x  OK",
+                          addr, sizeof(struct acpi_dmar), OEM_REVISION,
+                          ACPI_CREATOR_REVISION);
        ut_assert_console_end();
        unmap_sysmem(buf);
        free(buf);