aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHeinrich Schuchardt2024-04-18 05:11:13 +0200
committerSimon Glass2024-07-03 07:36:32 +0100
commit07a6c69759eb4a99f044962c8c40c093af534351 (patch)
treec0ef56dc0dfb584e0172c3068d8d40274cdd6468 /lib
parentd1fffbe3c808a9012a05b048560e17ce43f8ef9e (diff)
acpi: set creator_revision in acpi_fill_header
We should have a single place where we write the default value to the creator revision field. If we ever will have any table created by another tool, we can overwrite the value afterwards. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/acpi/acpi_table.c2
-rw-r--r--lib/acpi/ssdt.c1
2 files changed, 1 insertions, 2 deletions
diff --git a/lib/acpi/acpi_table.c b/lib/acpi/acpi_table.c
index c16ead6a6ec..6dbfdb22dec 100644
--- a/lib/acpi/acpi_table.c
+++ b/lib/acpi/acpi_table.c
@@ -117,6 +117,7 @@ void acpi_fill_header(struct acpi_table_header *header, char *signature)
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;
}
void acpi_align(struct acpi_ctx *ctx)
@@ -219,7 +220,6 @@ void acpi_create_dbg2(struct acpi_dbg2_header *dbg2,
header->revision = acpi_get_table_revision(ACPITAB_DBG2);
acpi_fill_header(header, "DBG2");
- header->creator_revision = ASL_REVISION;
/* One debug device defined */
dbg2->devices_offset = sizeof(struct acpi_dbg2_header);
diff --git a/lib/acpi/ssdt.c b/lib/acpi/ssdt.c
index e032e266b3c..df1d739d117 100644
--- a/lib/acpi/ssdt.c
+++ b/lib/acpi/ssdt.c
@@ -23,7 +23,6 @@ int acpi_write_ssdt(struct acpi_ctx *ctx, const struct acpi_writer *entry)
acpi_fill_header(ssdt, "SSDT");
ssdt->revision = acpi_get_table_revision(ACPITAB_SSDT);
- ssdt->creator_revision = 1;
ssdt->length = sizeof(struct acpi_table_header);
acpi_inc(ctx, sizeof(struct acpi_table_header));