diff --git a/src/arch/i386/boot/acpi.c b/src/arch/i386/boot/acpi.c index b05a2c5dae..515976636d 100644 --- a/src/arch/i386/boot/acpi.c +++ b/src/arch/i386/boot/acpi.c @@ -177,9 +177,9 @@ void acpi_create_madt(acpi_madt_t *madt) memset((void *)madt, 0, sizeof(acpi_madt_t)); /* fill out header fields */ - memcpy(header->signature, MADT_NAME, 4); + memcpy(header->signature, "APIC", 4); memcpy(header->oem_id, OEM_ID, 6); - memcpy(header->oem_table_id, MADT_TABLE, 8); + memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8); memcpy(header->asl_compiler_id, ASLC, 4); header->length = sizeof(acpi_madt_t); @@ -205,9 +205,9 @@ void acpi_create_mcfg(acpi_mcfg_t *mcfg) memset((void *)mcfg, 0, sizeof(acpi_mcfg_t)); /* fill out header fields */ - memcpy(header->signature, MCFG_NAME, 4); + memcpy(header->signature, "MCFG", 4); memcpy(header->oem_id, OEM_ID, 6); - memcpy(header->oem_table_id, MCFG_TABLE, 8); + memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8); memcpy(header->asl_compiler_id, ASLC, 4); header->length = sizeof(acpi_mcfg_t); @@ -232,7 +232,7 @@ void acpi_create_ssdt_generator(acpi_header_t *ssdt, char *oem_table_id) { unsigned long current=(unsigned long)ssdt+sizeof(acpi_header_t); memset((void *)ssdt, 0, sizeof(acpi_header_t)); - memcpy(&ssdt->signature, SSDT_NAME, 4); + memcpy(&ssdt->signature, "SSDT", 4); ssdt->revision = 2; memcpy(&ssdt->oem_id, OEM_ID, 6); memcpy(&ssdt->oem_table_id, oem_table_id, 8); @@ -289,9 +289,9 @@ void acpi_create_srat(acpi_srat_t *srat) memset((void *)srat, 0, sizeof(acpi_srat_t)); /* fill out header fields */ - memcpy(header->signature, SRAT_NAME, 4); + memcpy(header->signature, "SRAT", 4); memcpy(header->oem_id, OEM_ID, 6); - memcpy(header->oem_table_id, SRAT_TABLE, 8); + memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8); memcpy(header->asl_compiler_id, ASLC, 4); header->length = sizeof(acpi_srat_t); @@ -316,9 +316,9 @@ void acpi_create_slit(acpi_slit_t *slit) memset((void *)slit, 0, sizeof(acpi_slit_t)); /* fill out header fields */ - memcpy(header->signature, SLIT_NAME, 4); + memcpy(header->signature, "SLIT", 4); memcpy(header->oem_id, OEM_ID, 6); - memcpy(header->oem_table_id, SLIT_TABLE, 8); + memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8); memcpy(header->asl_compiler_id, ASLC, 4); header->length = sizeof(acpi_slit_t); @@ -343,7 +343,7 @@ void acpi_create_hpet(acpi_hpet_t *hpet) /* fill out header fields */ memcpy(header->signature, HPET_NAME, 4); memcpy(header->oem_id, OEM_ID, 6); - memcpy(header->oem_table_id, HPET_TABLE, 8); + memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8); memcpy(header->asl_compiler_id, ASLC, 4); header->length = sizeof(acpi_hpet_t); @@ -367,7 +367,7 @@ void acpi_create_facs(acpi_facs_t *facs) memset( (void *)facs,0, sizeof(acpi_facs_t)); - memcpy(facs->signature, FACS_NAME, 4); + memcpy(facs->signature, "FACS", 4); facs->length = sizeof(acpi_facs_t); facs->hardware_signature = 0; facs->firmware_waking_vector = 0; @@ -383,9 +383,9 @@ void acpi_write_rsdt(acpi_rsdt_t *rsdt) acpi_header_t *header=&(rsdt->header); /* fill out header fields */ - memcpy(header->signature, RSDT_NAME, 4); + memcpy(header->signature, "RSDT", 4); memcpy(header->oem_id, OEM_ID, 6); - memcpy(header->oem_table_id, RSDT_TABLE, 8); + memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8); memcpy(header->asl_compiler_id, ASLC, 4); header->length = sizeof(acpi_rsdt_t); @@ -405,9 +405,9 @@ void acpi_write_xsdt(acpi_xsdt_t *xsdt) acpi_header_t *header=&(xsdt->header); /* fill out header fields */ - memcpy(header->signature, XSDT_NAME, 4); + memcpy(header->signature, "XSDT", 4); memcpy(header->oem_id, OEM_ID, 6); - memcpy(header->oem_table_id, RSDT_TABLE, 8); + memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8); memcpy(header->asl_compiler_id, ASLC, 4); header->length = sizeof(acpi_xsdt_t); @@ -533,7 +533,7 @@ void *acpi_find_wakeup_vector(void) for (i = 0; ((char *) &rsdt->entry[i]) < end; i++) { fadt = (acpi_fadt_t *) rsdt->entry[i]; - if (strncmp((char *)fadt, FADT_NAME, sizeof(FADT_NAME) - 1) == 0) + if (strncmp((char *)fadt, "FACP", 4) == 0) break; fadt = NULL; } diff --git a/src/arch/i386/include/arch/acpi.h b/src/arch/i386/include/arch/acpi.h index 1b3f8d208f..7f87f64a03 100644 --- a/src/arch/i386/include/arch/acpi.h +++ b/src/arch/i386/include/arch/acpi.h @@ -18,34 +18,10 @@ #include -#define RSDP_SIG "RSD PTR " /* RSDT Pointer signature */ -#define RSDP_NAME "RSDP" - -#define RSDT_NAME "RSDT" -#define HPET_NAME "HPET" -#define MADT_NAME "APIC" -#define MCFG_NAME "MCFG" -#define SRAT_NAME "SRAT" -#define SLIT_NAME "SLIT" -#define SSDT_NAME "SSDT" -#define FACS_NAME "FACS" -#define FADT_NAME "FACP" -#define XSDT_NAME "XSDT" - -// Misnomer, the NAME above is the 4 byte signature, this (TABLE) is the -// OEM_TABLE_ID. -// +#define RSDP_SIG "RSD PTR " /* RSDT Pointer signature */ #define ACPI_TABLE_CREATOR "COREBOOT" -#define RSDT_TABLE ACPI_TABLE_CREATOR -#define HPET_TABLE ACPI_TABLE_CREATOR -#define MCFG_TABLE ACPI_TABLE_CREATOR -#define MADT_TABLE ACPI_TABLE_CREATOR -#define SRAT_TABLE ACPI_TABLE_CREATOR -#define SLIT_TABLE ACPI_TABLE_CREATOR -#define XSDT_TABLE ACPI_TABLE_CREATOR - -#define OEM_ID "CORE " -#define ASLC "CORE" +#define OEM_ID "CORE " +#define ASLC "CORE" /* ACPI 3.0 table RSDP */ diff --git a/src/mainboard/intel/eagleheights/acpi_tables.c b/src/mainboard/intel/eagleheights/acpi_tables.c index a6b06ff763..71ba060d7f 100644 --- a/src/mainboard/intel/eagleheights/acpi_tables.c +++ b/src/mainboard/intel/eagleheights/acpi_tables.c @@ -59,7 +59,7 @@ void acpi_create_intel_hpet(acpi_hpet_t * hpet) memset((void *) hpet, 0, sizeof(acpi_hpet_t)); /* fill out header fields */ - memcpy(header->signature, HPET_NAME, 4); + memcpy(header->signature, "HPET", 4); memcpy(header->oem_id, OEM_ID, 6); memcpy(header->oem_table_id, "IC ", 8); memcpy(header->asl_compiler_id, ASLC, 4); diff --git a/src/mainboard/kontron/986lcd-m/acpi_tables.c b/src/mainboard/kontron/986lcd-m/acpi_tables.c index 81614b615e..fae33c8700 100644 --- a/src/mainboard/kontron/986lcd-m/acpi_tables.c +++ b/src/mainboard/kontron/986lcd-m/acpi_tables.c @@ -133,7 +133,7 @@ void acpi_create_intel_hpet(acpi_hpet_t * hpet) memset((void *) hpet, 0, sizeof(acpi_hpet_t)); /* fill out header fields */ - memcpy(header->signature, HPET_NAME, 4); + memcpy(header->signature, "HPET", 4); memcpy(header->oem_id, OEM_ID, 6); memcpy(header->oem_table_id, "COREBOOT", 8); memcpy(header->asl_compiler_id, ASLC, 4); diff --git a/src/mainboard/via/vt8454c/acpi_tables.c b/src/mainboard/via/vt8454c/acpi_tables.c index 42dfef2da7..793aceb017 100644 --- a/src/mainboard/via/vt8454c/acpi_tables.c +++ b/src/mainboard/via/vt8454c/acpi_tables.c @@ -61,7 +61,7 @@ void acpi_create_via_hpet(acpi_hpet_t * hpet) memset((void *) hpet, 0, sizeof(acpi_hpet_t)); /* fill out header fields */ - memcpy(header->signature, HPET_NAME, 4); + memcpy(header->signature, "HPET", 4); memcpy(header->oem_id, OEM_ID, 6); memcpy(header->oem_table_id, "COREBOOT", 8); memcpy(header->asl_compiler_id, ASLC, 4);