From: Alexandru Elisei <alexandru.elisei@xxxxxxx> kvm-unit-tests is about to import several table struct definitions from Linux, convert the names of the existing tables to follow the Linux style. This is purely a cosmetic change and no functional change is intended. Signed-off-by: Nikos Nikoleris <nikos.nikoleris@xxxxxxx> --- lib/acpi.h | 10 +++++----- lib/acpi.c | 16 ++++++++-------- lib/x86/setup.c | 2 +- x86/s3.c | 4 ++-- x86/vmexit.c | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/acpi.h b/lib/acpi.h index 2da49451..f9a344e9 100644 --- a/lib/acpi.h +++ b/lib/acpi.h @@ -17,7 +17,7 @@ #define RSDP_SIGNATURE_8BYTE (ACPI_SIGNATURE_8BYTE('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')) -struct rsdp_descriptor { /* Root System Descriptor Pointer */ +struct acpi_table_rsdp { /* Root System Descriptor Pointer */ u64 signature; /* ACPI signature, contains "RSD PTR " */ u8 checksum; /* To make sum of struct == 0 */ u8 oem_id[6]; /* OEM identification */ @@ -45,12 +45,12 @@ struct acpi_table { char data[]; }; -struct rsdt_descriptor_rev1 { +struct acpi_table_rsdt_rev1 { ACPI_TABLE_HEADER_DEF u32 table_offset_entry[]; }; -struct fadt_descriptor_rev1 { +struct acpi_table_fadt_rev1 { ACPI_TABLE_HEADER_DEF /* ACPI common table header */ u32 firmware_ctrl; /* Physical address of FACS */ u32 dsdt; /* Physical address of DSDT */ @@ -92,7 +92,7 @@ struct fadt_descriptor_rev1 { u8 reserved4b; /* Reserved */ }; -struct facs_descriptor_rev1 { +struct acpi_table_facs_rev1 { u32 signature; /* ACPI Signature */ u32 length; /* Length of structure, in bytes */ u32 hardware_signature; /* Hardware configuration signature */ @@ -103,7 +103,7 @@ struct facs_descriptor_rev1 { u8 reserved3[40]; /* Reserved - must be zero */ }; -void set_efi_rsdp(struct rsdp_descriptor *rsdp); +void set_efi_rsdp(struct acpi_table_rsdp *rsdp); void *find_acpi_table_addr(u32 sig); #endif diff --git a/lib/acpi.c b/lib/acpi.c index 3f87711a..166ffd14 100644 --- a/lib/acpi.c +++ b/lib/acpi.c @@ -2,14 +2,14 @@ #include "acpi.h" #ifdef CONFIG_EFI -struct rsdp_descriptor *efi_rsdp = NULL; +struct acpi_table_rsdp *efi_rsdp = NULL; -void set_efi_rsdp(struct rsdp_descriptor *rsdp) +void set_efi_rsdp(struct acpi_table_rsdp *rsdp) { efi_rsdp = rsdp; } -static struct rsdp_descriptor *get_rsdp(void) +static struct acpi_table_rsdp *get_rsdp(void) { if (efi_rsdp == NULL) printf("Can't find RSDP from UEFI, maybe set_efi_rsdp() was not called\n"); @@ -17,9 +17,9 @@ static struct rsdp_descriptor *get_rsdp(void) return efi_rsdp; } #else -static struct rsdp_descriptor *get_rsdp(void) +static struct acpi_table_rsdp *get_rsdp(void) { - struct rsdp_descriptor *rsdp; + struct acpi_table_rsdp *rsdp; unsigned long addr; for (addr = 0xe0000; addr < 0x100000; addr += 16) { @@ -37,14 +37,14 @@ static struct rsdp_descriptor *get_rsdp(void) void *find_acpi_table_addr(u32 sig) { - struct rsdt_descriptor_rev1 *rsdt; - struct rsdp_descriptor *rsdp; + struct acpi_table_rsdt_rev1 *rsdt; + struct acpi_table_rsdp *rsdp; void *end; int i; /* FACS is special... */ if (sig == FACS_SIGNATURE) { - struct fadt_descriptor_rev1 *fadt; + struct acpi_table_fadt_rev1 *fadt; fadt = find_acpi_table_addr(FACP_SIGNATURE); if (!fadt) diff --git a/lib/x86/setup.c b/lib/x86/setup.c index dd150300..d509a248 100644 --- a/lib/x86/setup.c +++ b/lib/x86/setup.c @@ -245,7 +245,7 @@ static efi_status_t setup_memory_allocator(efi_bootinfo_t *efi_bootinfo) static efi_status_t setup_rsdp(efi_bootinfo_t *efi_bootinfo) { efi_status_t status; - struct rsdp_descriptor *rsdp; + struct acpi_table_rsdp *rsdp; /* * RSDP resides in an EFI_ACPI_RECLAIM_MEMORY region, which is not used diff --git a/x86/s3.c b/x86/s3.c index 378d37ae..96db728c 100644 --- a/x86/s3.c +++ b/x86/s3.c @@ -4,7 +4,7 @@ static u32* find_resume_vector_addr(void) { - struct facs_descriptor_rev1 *facs = find_acpi_table_addr(FACS_SIGNATURE); + struct acpi_table_facs_rev1 *facs = find_acpi_table_addr(FACS_SIGNATURE); if (!facs) return 0; printf("FACS is at %p\n", facs); @@ -39,7 +39,7 @@ extern char resume_start, resume_end; int main(int argc, char **argv) { - struct fadt_descriptor_rev1 *fadt = find_acpi_table_addr(FACP_SIGNATURE); + struct acpi_table_fadt_rev1 *fadt = find_acpi_table_addr(FACP_SIGNATURE); volatile u32 *resume_vector_ptr = find_resume_vector_addr(); char *addr, *resume_vec = (void*)0x1000; diff --git a/x86/vmexit.c b/x86/vmexit.c index 9260accc..12234f9e 100644 --- a/x86/vmexit.c +++ b/x86/vmexit.c @@ -206,7 +206,7 @@ int pm_tmr_blk; static void inl_pmtimer(void) { if (!pm_tmr_blk) { - struct fadt_descriptor_rev1 *fadt; + struct acpi_table_fadt_rev1 *fadt; fadt = find_acpi_table_addr(FACP_SIGNATURE); pm_tmr_blk = fadt->pm_tmr_blk; -- 2.25.1