]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
boot: Add ARM64 support to the EFI stub
authorDimitri John Ledkov <xnox@ubuntu.com>
Wed, 13 Nov 2019 01:20:44 +0000 (17:20 -0800)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 14 Nov 2019 09:03:08 +0000 (10:03 +0100)
src/boot/efi/pe.c

index f1f947b183f5149de0e5eee7dc7e3b5dc76a2bbd..68f50aec410ee5bcf64ce73dff4f55439ed896a5 100644 (file)
@@ -30,6 +30,7 @@ struct DosFileHeader {
 
 #define PE_HEADER_MACHINE_I386          0x014c
 #define PE_HEADER_MACHINE_X64           0x8664
+#define PE_HEADER_MACHINE_ARM64         0xaa64
 struct PeFileHeader {
         UINT16  Machine;
         UINT16  NumberOfSections;
@@ -75,6 +76,7 @@ EFI_STATUS pe_memory_locate_sections(CHAR8 *base, CHAR8 **sections, UINTN *addrs
 
         /* PE32+ Subsystem type */
         if (pe->FileHeader.Machine != PE_HEADER_MACHINE_X64 &&
+            pe->FileHeader.Machine != PE_HEADER_MACHINE_ARM64 &&
             pe->FileHeader.Machine != PE_HEADER_MACHINE_I386)
                 return EFI_LOAD_ERROR;