aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvruppert <vruppert>2008-12-20 14:26:55 +0000
committervruppert <vruppert>2008-12-20 14:26:55 +0000
commit299f7afd33333545cfc3242d560ceebcab0f41eb (patch)
tree391487749da0c7a26dafb8567681cf3b7ea79dad /kvm/bios/rombios32.c
parentPatch applied (diff)
downloadqemu-kvm-299f7afd33333545cfc3242d560ceebcab0f41eb.tar.gz
qemu-kvm-299f7afd33333545cfc3242d560ceebcab0f41eb.tar.bz2
qemu-kvm-299f7afd33333545cfc3242d560ceebcab0f41eb.zip
- applied 3 patches from the Qemu project (Anthony Liguori)
* disable stack protector for BIOS * make ACPI tables byte-aligned * fix Bochs BIOS build from a separate directory
Diffstat (limited to 'kvm/bios/rombios32.c')
-rw-r--r--kvm/bios/rombios32.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/kvm/bios/rombios32.c b/kvm/bios/rombios32.c
index b0eac3f7b..f6c9e891f 100644
--- a/kvm/bios/rombios32.c
+++ b/kvm/bios/rombios32.c
@@ -1094,6 +1094,12 @@ static void mptable_init(void)
/* Table structure from Linux kernel (the ACPI tables are under the
BSD license) */
+/*
+ * 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) */\
uint32_t length; /* Length of table, in bytes, including header */\
@@ -1280,6 +1286,10 @@ struct madt_io_apic
* lines start */
};
+/* Reset to default packing */
+
+#pragma pack()
+
#include "acpi-dsdt.hex"
static inline uint16_t cpu_to_le16(uint16_t x)