acpi_table_header: Replace hard-coded length via sizeof(acpi_fadt_t)
Minimize use of hard-coded value for acpi_table_header->length to soft code. Replace length of acpi_header_t with sizeof(acpi_fadt_t). Change-Id: Ibcae72e8f02497719fcd3f180838557e8e9abd38 Signed-off-by: Himanshu Sahdev <himanshusah@hcl.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35540 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
This commit is contained in:
parent
9b93383f5b
commit
fa6024e15e
|
@ -35,7 +35,7 @@ void acpi_create_fadt(acpi_fadt_t *fadt,acpi_facs_t *facs,void *dsdt){
|
||||||
/* Prepare the header */
|
/* Prepare the header */
|
||||||
memset((void *)fadt,0,sizeof(acpi_fadt_t));
|
memset((void *)fadt,0,sizeof(acpi_fadt_t));
|
||||||
memcpy(header->signature,"FACP",4);
|
memcpy(header->signature,"FACP",4);
|
||||||
header->length = 244;
|
header->length = sizeof(acpi_fadt_t);
|
||||||
header->revision = get_acpi_table_revision(FADT);
|
header->revision = get_acpi_table_revision(FADT);
|
||||||
memcpy(header->oem_id,OEM_ID,6);
|
memcpy(header->oem_id,OEM_ID,6);
|
||||||
memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
|
memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
|
||||||
|
|
|
@ -49,7 +49,7 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt)
|
||||||
/* Prepare the header */
|
/* Prepare the header */
|
||||||
memset((void *)fadt, 0, sizeof(acpi_fadt_t));
|
memset((void *)fadt, 0, sizeof(acpi_fadt_t));
|
||||||
memcpy(header->signature, "FACP", 4);
|
memcpy(header->signature, "FACP", 4);
|
||||||
header->length = 244;
|
header->length = sizeof(acpi_fadt_t);
|
||||||
header->revision = ACPI_FADT_REV_ACPI_1_0;
|
header->revision = ACPI_FADT_REV_ACPI_1_0;
|
||||||
memcpy(header->oem_id, OEM_ID, 6);
|
memcpy(header->oem_id, OEM_ID, 6);
|
||||||
memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
|
memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
|
||||||
|
|
|
@ -36,7 +36,7 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt)
|
||||||
/* Prepare the header */
|
/* Prepare the header */
|
||||||
memset((void *)fadt, 0, sizeof(acpi_fadt_t));
|
memset((void *)fadt, 0, sizeof(acpi_fadt_t));
|
||||||
memcpy(header->signature, "FACP", 4);
|
memcpy(header->signature, "FACP", 4);
|
||||||
header->length = 244;
|
header->length = sizeof(acpi_fadt_t);
|
||||||
header->revision = get_acpi_table_revision(FADT);
|
header->revision = get_acpi_table_revision(FADT);
|
||||||
memcpy(header->oem_id, OEM_ID, 6);
|
memcpy(header->oem_id, OEM_ID, 6);
|
||||||
memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
|
memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
|
||||||
|
|
|
@ -36,7 +36,7 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt)
|
||||||
/* Prepare the header */
|
/* Prepare the header */
|
||||||
memset((void *)fadt, 0, sizeof(acpi_fadt_t));
|
memset((void *)fadt, 0, sizeof(acpi_fadt_t));
|
||||||
memcpy(header->signature, "FACP", 4);
|
memcpy(header->signature, "FACP", 4);
|
||||||
header->length = 244;
|
header->length = sizeof(acpi_fadt_t);
|
||||||
header->revision = get_acpi_table_revision(FADT);
|
header->revision = get_acpi_table_revision(FADT);
|
||||||
memcpy(header->oem_id, OEM_ID, 6);
|
memcpy(header->oem_id, OEM_ID, 6);
|
||||||
memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
|
memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
|
||||||
|
|
|
@ -38,7 +38,7 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
|
||||||
|
|
||||||
memset((void *) fadt, 0, sizeof(acpi_fadt_t));
|
memset((void *) fadt, 0, sizeof(acpi_fadt_t));
|
||||||
memcpy(header->signature, "FACP", 4);
|
memcpy(header->signature, "FACP", 4);
|
||||||
header->length = 244;
|
header->length = sizeof(acpi_fadt_t);
|
||||||
header->revision = ACPI_FADT_REV_ACPI_1_0;
|
header->revision = ACPI_FADT_REV_ACPI_1_0;
|
||||||
memcpy(header->oem_id, OEM_ID, 6);
|
memcpy(header->oem_id, OEM_ID, 6);
|
||||||
memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
|
memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
|
||||||
|
|
Loading…
Reference in New Issue