ia32: Explicitly pack ACPI structs

Use explicit struct packing instead of using compiler asserts
to check that packing happened as expected
This commit is contained in:
Adrian Danis 2015-05-19 16:29:38 +10:00
parent ca1191c7dc
commit f7a902198e

View file

@ -26,16 +26,13 @@ typedef struct acpi_header {
uint32_t oem_revision;
char creater_id[4];
uint32_t creater_revision;
} acpi_header_t;
compile_assert(acpi_header_packed, sizeof(acpi_header_t) == 36)
} PACKED acpi_header_t;
/* Root System Descriptor Table */
typedef struct acpi_rsdt {
acpi_header_t header;
uint32_t entry[1];
} acpi_rsdt_t;
compile_assert(acpi_rsdt_packed,
sizeof(acpi_rsdt_t) == sizeof(acpi_header_t) + sizeof(uint32_t))
} PACKED acpi_rsdt_t;
acpi_rsdt_t* acpi_init(void);