From 1dd89f2d2e939cce82584dab53503f6ce765dae3 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sat, 23 Apr 2016 15:51:17 +0000 Subject: 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@ --- sys/arch/amd64/stand/efi/include/i386/efibind.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/arch/amd64/stand') 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; -- cgit v1.2.3