Name of user not set #1002476 has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36428 )
Change subject: arch/acpi.h: Use of typedef for acpi_spmi ......................................................................
arch/acpi.h: Use of typedef for acpi_spmi
Use of typedef and modify the usage accordingly.
Change-Id: Iab59f26a4f069efb991fa3d077a5bbae78d90bdc Signed-off-by: Himanshu Sahdev himanshusah@hcl.com --- M src/arch/x86/acpi.c M src/arch/x86/include/arch/acpi.h M src/drivers/ipmi/ipmi_kcs_ops.c 3 files changed, 8 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/28/36428/1
diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c index 2f793b4..ee48100 100644 --- a/src/arch/x86/acpi.c +++ b/src/arch/x86/acpi.c @@ -770,7 +770,7 @@ }
void acpi_create_ipmi(struct device *device, - struct acpi_spmi *spmi, + acpi_spmi_t *spmi, const u16 ipmi_revision, const acpi_addr_t *addr, const enum acpi_ipmi_interface_type type, @@ -779,7 +779,7 @@ const u32 uid) { acpi_header_t *header = &(spmi->header); - memset((void *)spmi, 0, sizeof(struct acpi_spmi)); + memset((void *)spmi, 0, sizeof(acpi_spmi_t));
/* Fill out header fields. */ memcpy(header->signature, "SPMI", 4); @@ -788,7 +788,7 @@ memcpy(header->asl_compiler_id, ASLC, 4);
header->asl_compiler_revision = asl_revision; - header->length = sizeof(struct acpi_spmi); + header->length = sizeof(acpi_spmi_t); header->revision = get_acpi_table_revision(SPMI);
spmi->reserved = 1; diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h index 20c244c..0269e5b 100644 --- a/src/arch/x86/include/arch/acpi.h +++ b/src/arch/x86/include/arch/acpi.h @@ -792,7 +792,7 @@ #define ACPI_IPMI_INT_TYPE_APIC (1 << 1)
/* ACPI IPMI 2.0 */ -struct acpi_spmi { +typedef struct acpi_spmi { acpi_header_t header; u8 interface_type; u8 reserved; @@ -814,7 +814,7 @@ u8 uid[4]; }; u8 reserved3; -} __packed; +} __packed acpi_spmi_t;
unsigned long fw_cfg_acpi_tables(unsigned long start);
@@ -869,7 +869,7 @@ unsigned long current));
void acpi_create_ipmi(struct device *device, - struct acpi_spmi *spmi, + acpi_spmi_t *spmi, const u16 ipmi_revision, const acpi_addr_t *addr, const enum acpi_ipmi_interface_type type, diff --git a/src/drivers/ipmi/ipmi_kcs_ops.c b/src/drivers/ipmi/ipmi_kcs_ops.c index 90f19dd..59269f9 100644 --- a/src/drivers/ipmi/ipmi_kcs_ops.c +++ b/src/drivers/ipmi/ipmi_kcs_ops.c @@ -121,7 +121,7 @@ struct acpi_rsdp *rsdp) { struct drivers_ipmi_config *conf = NULL; - struct acpi_spmi *spmi; + acpi_spmi_t *spmi; s8 gpe_interrupt = -1; u32 apic_interrupt = 0; acpi_addr_t addr = { @@ -148,7 +148,7 @@
current = ALIGN_UP(current, 8); printk(BIOS_DEBUG, "ACPI: * SPMI at %lx\n", current); - spmi = (struct acpi_spmi *)current; + spmi = (acpi_spmi_t *)current;
if (dev->chip_info) conf = dev->chip_info;