* updated firefox (133.0.3 -> 134.0.2)
[t2sde.git] / package / boot / grub2 / hotfix-ia64-acpi-madt.patch
blob8ce964b11c43292577dfcd8adbda1d2c6c58f7b9
1 From aa80270154d8593496a1f80398c1c66ddf87d635 Mon Sep 17 00:00:00 2001
2 From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
3 Date: Fri, 15 Mar 2024 22:02:07 +0300
4 Subject: acpi: Mark MADT entries as packed
6 No alignment is guaranteed and in fact on my IA-64 SAPIC is aligned
7 to 4 bytes instead of 8 and causes a trap. It affects only rarely used
8 lsacpi command and so went unnoticed.
10 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
11 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
12 ---
13 include/grub/acpi.h | 11 ++++++-----
14 1 file changed, 6 insertions(+), 5 deletions(-)
16 diff --git a/include/grub/acpi.h b/include/grub/acpi.h
17 index 17aadb8..f2862da 100644
18 --- a/include/grub/acpi.h
19 +++ b/include/grub/acpi.h
20 @@ -81,6 +81,7 @@ struct grub_acpi_fadt
22 #define GRUB_ACPI_MADT_SIGNATURE "APIC"
24 +/* Note: here GRUB_PACKED is not needed because we have grub_uint8_t only. */
25 struct grub_acpi_madt_entry_header
27 grub_uint8_t type;
28 @@ -112,7 +113,7 @@ struct grub_acpi_madt_entry_lapic
29 grub_uint8_t acpiid;
30 grub_uint8_t apicid;
31 grub_uint32_t flags;
32 -};
33 +} GRUB_PACKED;
35 struct grub_acpi_madt_entry_ioapic
37 @@ -121,7 +122,7 @@ struct grub_acpi_madt_entry_ioapic
38 grub_uint8_t pad;
39 grub_uint32_t address;
40 grub_uint32_t global_sys_interrupt;
41 -};
42 +} GRUB_PACKED;
44 struct grub_acpi_madt_entry_interrupt_override
46 @@ -148,7 +149,7 @@ struct grub_acpi_madt_entry_sapic
47 grub_uint8_t pad;
48 grub_uint32_t global_sys_interrupt_base;
49 grub_uint64_t addr;
50 -};
51 +} GRUB_PACKED;
53 struct grub_acpi_madt_entry_lsapic
55 @@ -160,7 +161,7 @@ struct grub_acpi_madt_entry_lsapic
56 grub_uint32_t flags;
57 grub_uint32_t cpu_uid;
58 grub_uint8_t cpu_uid_str[0];
59 -};
60 +} GRUB_PACKED;
62 struct grub_acpi_madt_entry_platform_int_source
64 @@ -172,7 +173,7 @@ struct grub_acpi_madt_entry_platform_int_source
65 grub_uint8_t sapic_vector;
66 grub_uint32_t global_sys_int;
67 grub_uint32_t src_flags;
68 -};
69 +} GRUB_PACKED;
71 enum
73 --
74 cgit v1.1