No alignment is guaranteed and in fact on my IA-64 SAPIC is aligned
to 4 bytes instead of 8 and causes a trap. It affects only rarely used
lsacpi command and so went unnoticed.
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
#define GRUB_ACPI_MADT_SIGNATURE "APIC"
+/* Note: here GRUB_PACKED is not needed because we have grub_uint8_t only. */
struct grub_acpi_madt_entry_header
{
grub_uint8_t type;
grub_uint8_t acpiid;
grub_uint8_t apicid;
grub_uint32_t flags;
-};
+} GRUB_PACKED;
struct grub_acpi_madt_entry_ioapic
{
grub_uint8_t pad;
grub_uint32_t address;
grub_uint32_t global_sys_interrupt;
-};
+} GRUB_PACKED;
struct grub_acpi_madt_entry_interrupt_override
{
grub_uint8_t pad;
grub_uint32_t global_sys_interrupt_base;
grub_uint64_t addr;
-};
+} GRUB_PACKED;
struct grub_acpi_madt_entry_lsapic
{
grub_uint32_t flags;
grub_uint32_t cpu_uid;
grub_uint8_t cpu_uid_str[0];
-};
+} GRUB_PACKED;
struct grub_acpi_madt_entry_platform_int_source
{
grub_uint8_t sapic_vector;
grub_uint32_t global_sys_int;
grub_uint32_t src_flags;
-};
+} GRUB_PACKED;
enum
{