summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2017-06-22 21:37:21 +0300
committerRichard Lowe <richlowe@richlowe.net>2017-06-24 12:27:38 -0400
commitfeff18a41e45afb02478e67d56fad5027334f115 (patch)
treeffc8f950cdceb80d3f2fa330ff00725ddb2a52f9 /usr/src
parent4cad604c8f7a70d13a2b3235019bd05a137bdc3b (diff)
downloadillumos-joyent-feff18a41e45afb02478e67d56fad5027334f115.tar.gz
8420 loader.efi: EFI_MEMORY_DESCRIPTOR and EFI_BLOCK_IO_MEDIA need padding
Reviewed by: Jason King <jason.brian.king@gmail.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/boot/sys/boot/efi/include/efidef.h3
-rw-r--r--usr/src/boot/sys/boot/efi/include/efiprot.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/usr/src/boot/sys/boot/efi/include/efidef.h b/usr/src/boot/sys/boot/efi/include/efidef.h
index 3ee0708144..8ab963aabe 100644
--- a/usr/src/boot/sys/boot/efi/include/efidef.h
+++ b/usr/src/boot/sys/boot/efi/include/efidef.h
@@ -191,11 +191,12 @@ typedef enum {
#define EFI_MEMORY_DESCRIPTOR_VERSION 1
typedef struct {
UINT32 Type; // Field size is 32 bits followed by 32 bit pad
+ UINT32 Pad;
EFI_PHYSICAL_ADDRESS PhysicalStart; // Field size is 64 bits
EFI_VIRTUAL_ADDRESS VirtualStart; // Field size is 64 bits
UINT64 NumberOfPages; // Field size is 64 bits
UINT64 Attribute; // Field size is 64 bits
-} EFI_MEMORY_DESCRIPTOR;
+} __packed EFI_MEMORY_DESCRIPTOR;
//
// International Language
diff --git a/usr/src/boot/sys/boot/efi/include/efiprot.h b/usr/src/boot/sys/boot/efi/include/efiprot.h
index 28cec5991e..9e14d9c9ee 100644
--- a/usr/src/boot/sys/boot/efi/include/efiprot.h
+++ b/usr/src/boot/sys/boot/efi/include/efiprot.h
@@ -90,12 +90,14 @@ typedef struct {
BOOLEAN LogicalPartition;
BOOLEAN ReadOnly;
BOOLEAN WriteCaching;
+ UINT8 pad1[3];
UINT32 BlockSize;
UINT32 IoAlign;
+ UINT8 pad2[4];
EFI_LBA LastBlock;
-} EFI_BLOCK_IO_MEDIA;
+} __packed EFI_BLOCK_IO_MEDIA;
typedef struct _EFI_BLOCK_IO {
UINT64 Revision;