Author: stepan Date: 2009-07-22 00:15:43 +0200 (Wed, 22 Jul 2009) New Revision: 4460
Modified: trunk/coreboot-v2/src/arch/i386/boot/acpi.c trunk/coreboot-v2/src/arch/i386/include/arch/acpi.h trunk/coreboot-v2/src/mainboard/intel/eagleheights/acpi_tables.c trunk/coreboot-v2/src/mainboard/kontron/986lcd-m/acpi_tables.c trunk/coreboot-v2/src/mainboard/via/vt8454c/acpi_tables.c Log: clean up acpi table strings, as discussed on the list
Signed-off-by: Stefan Reinauer stepan@coresystems.de Acked-by: Stefan Reinauer stepan@coresystems.de
Modified: trunk/coreboot-v2/src/arch/i386/boot/acpi.c =================================================================== --- trunk/coreboot-v2/src/arch/i386/boot/acpi.c 2009-07-21 22:01:21 UTC (rev 4459) +++ trunk/coreboot-v2/src/arch/i386/boot/acpi.c 2009-07-21 22:15:43 UTC (rev 4460) @@ -177,9 +177,9 @@ 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 @@ 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 @@ { 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 @@ 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 @@ 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 @@ /* 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 @@ 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 @@ 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 @@ 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 @@
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; }
Modified: trunk/coreboot-v2/src/arch/i386/include/arch/acpi.h =================================================================== --- trunk/coreboot-v2/src/arch/i386/include/arch/acpi.h 2009-07-21 22:01:21 UTC (rev 4459) +++ trunk/coreboot-v2/src/arch/i386/include/arch/acpi.h 2009-07-21 22:15:43 UTC (rev 4460) @@ -18,35 +18,11 @@
#include <stdint.h>
-#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 */
typedef struct acpi_rsdp {
Modified: trunk/coreboot-v2/src/mainboard/intel/eagleheights/acpi_tables.c =================================================================== --- trunk/coreboot-v2/src/mainboard/intel/eagleheights/acpi_tables.c 2009-07-21 22:01:21 UTC (rev 4459) +++ trunk/coreboot-v2/src/mainboard/intel/eagleheights/acpi_tables.c 2009-07-21 22:15:43 UTC (rev 4460) @@ -59,7 +59,7 @@ 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);
Modified: trunk/coreboot-v2/src/mainboard/kontron/986lcd-m/acpi_tables.c =================================================================== --- trunk/coreboot-v2/src/mainboard/kontron/986lcd-m/acpi_tables.c 2009-07-21 22:01:21 UTC (rev 4459) +++ trunk/coreboot-v2/src/mainboard/kontron/986lcd-m/acpi_tables.c 2009-07-21 22:15:43 UTC (rev 4460) @@ -133,7 +133,7 @@ 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);
Modified: trunk/coreboot-v2/src/mainboard/via/vt8454c/acpi_tables.c =================================================================== --- trunk/coreboot-v2/src/mainboard/via/vt8454c/acpi_tables.c 2009-07-21 22:01:21 UTC (rev 4459) +++ trunk/coreboot-v2/src/mainboard/via/vt8454c/acpi_tables.c 2009-07-21 22:15:43 UTC (rev 4460) @@ -61,7 +61,7 @@ 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);