summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/stand
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2016-04-23 15:51:17 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2016-04-23 15:51:17 +0000
commit1dd89f2d2e939cce82584dab53503f6ce765dae3 (patch)
treef475223af778d22d6ddd795f75c63ad91be9d58e /sys/arch/amd64/stand
parent3ba9d69b1be80cd2e191d5a7d5c7b334e17d0217 (diff)
Seems that the 32-bit Windows ABI does align 64-bit structure members on
a 64-bit boundary (in constrast to the System V i386 ABI). Use an alignment attribute to force 64-bit alignment of the INT64 and UINT64 types. This makes the definitions of the EFI data structures match the expectations of the firmware. Fixes the issue where the 32-bit UEFI bootloader (BOOTIA32.EFI) would not detect a GPT leading to a failure to boot. Cluestick from John Troy. ok krw@, yasuoka@
Diffstat (limited to 'sys/arch/amd64/stand')
-rw-r--r--sys/arch/amd64/stand/efi/include/i386/efibind.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/amd64/stand/efi/include/i386/efibind.h b/sys/arch/amd64/stand/efi/include/i386/efibind.h
index c477816170f..3ebdf105a33 100644
--- a/sys/arch/amd64/stand/efi/include/i386/efibind.h
+++ b/sys/arch/amd64/stand/efi/include/i386/efibind.h
@@ -88,8 +88,8 @@ Revision History
#ifndef ACPI_THREAD_ID /* ACPI's definitions are fine, use those */
#define ACPI_USE_SYSTEM_INTTYPES 1 /* Tell ACPI we've defined types */
-typedef uint64_t UINT64;
-typedef int64_t INT64;
+typedef uint64_t UINT64 __attribute__((__aligned__(8)));
+typedef int64_t INT64 __attribute__((__aligned__(8)));
#ifndef _BASETSD_H_
typedef uint32_t UINT32;