diff options
author | vruppert <vruppert> | 2008-12-23 09:20:43 +0000 |
---|---|---|
committer | vruppert <vruppert> | 2008-12-23 09:20:43 +0000 |
commit | 422f5c5f24a84303dc8c0a507d31f8098456011a (patch) | |
tree | 3686fa6d463581181b4ca0e6b0bc2a727e9b6cc1 /bios | |
parent | ddfb6acefb1caf6e36f4ee486143cbebb5769e1f (diff) |
- use "__attribute__((__packed__))" instead of "#pragma pack" (Sebastian Herbszt)
Diffstat (limited to 'bios')
-rw-r--r-- | bios/rombios32.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/bios/rombios32.c b/bios/rombios32.c index f6c9e891..388b273e 100644 --- a/bios/rombios32.c +++ b/bios/rombios32.c @@ -1098,7 +1098,6 @@ static void mptable_init(void) * All tables must be byte-packed to match the ACPI specification, since * the tables are provided by the system BIOS. */ -#pragma pack(1) #define ACPI_TABLE_HEADER_DEF /* ACPI common table header */ \ uint8_t signature [4]; /* ACPI signature (4 ASCII characters) */\ @@ -1115,7 +1114,7 @@ static void mptable_init(void) struct acpi_table_header /* ACPI common table header */ { ACPI_TABLE_HEADER_DEF -}; +} __attribute__((__packed__)); struct rsdp_descriptor /* Root System Descriptor Pointer */ { @@ -1128,7 +1127,7 @@ struct rsdp_descriptor /* Root System Descriptor Pointer */ uint64_t xsdt_physical_address; /* 64-bit physical address of XSDT */ uint8_t extended_checksum; /* Checksum of entire table */ uint8_t reserved [3]; /* Reserved field must be 0 */ -}; +} __attribute__((__packed__)); /* * ACPI 1.0 Root System Description Table (RSDT) @@ -1138,7 +1137,7 @@ struct rsdt_descriptor_rev1 ACPI_TABLE_HEADER_DEF /* ACPI common table header */ uint32_t table_offset_entry [3]; /* Array of pointers to other */ /* ACPI tables */ -}; +} __attribute__((__packed__)); /* * ACPI 1.0 Firmware ACPI Control Structure (FACS) @@ -1153,7 +1152,7 @@ struct facs_descriptor_rev1 uint32_t S4bios_f : 1; /* Indicates if S4BIOS support is present */ uint32_t reserved1 : 31; /* Must be 0 */ uint8_t resverved3 [40]; /* Reserved - must be zero */ -}; +} __attribute__((__packed__)); /* @@ -1214,7 +1213,7 @@ struct fadt_descriptor_rev1 #else uint32_t flags; #endif -}; +} __attribute__((__packed__)); /* * MADT values and structures @@ -1238,7 +1237,7 @@ struct multiple_apic_table #else uint32_t flags; #endif -}; +} __attribute__((__packed__)); /* Values for Type in APIC_HEADER_DEF */ @@ -1274,7 +1273,7 @@ struct madt_processor_apic #else uint32_t flags; #endif -}; +} __attribute__((__packed__)); struct madt_io_apic { @@ -1284,11 +1283,7 @@ struct madt_io_apic uint32_t address; /* APIC physical address */ uint32_t interrupt; /* Global system interrupt where INTI * lines start */ -}; - -/* Reset to default packing */ - -#pragma pack() +} __attribute__((__packed__)); #include "acpi-dsdt.hex" |