efi/libstub: Introduce symbolic constants for the stub major/minor version
Now that we have added new ways to load the initrd or the mixed mode kernel, we will also need a way to tell the loader about this. Add symbolic constants for the PE/COFF major/minor version numbers (which fortunately have always been 0x0 for all architectures), so that we can bump them later to document the capabilities of the stub. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
Родитель
a3326a0d87
Коммит
148d3f716c
|
@ -70,8 +70,8 @@ extra_header_fields:
|
|||
.long SZ_512 @ FileAlignment
|
||||
.short 0 @ MajorOsVersion
|
||||
.short 0 @ MinorOsVersion
|
||||
.short 0 @ MajorImageVersion
|
||||
.short 0 @ MinorImageVersion
|
||||
.short LINUX_EFISTUB_MAJOR_VERSION @ MajorImageVersion
|
||||
.short LINUX_EFISTUB_MINOR_VERSION @ MinorImageVersion
|
||||
.short 0 @ MajorSubsystemVersion
|
||||
.short 0 @ MinorSubsystemVersion
|
||||
.long 0 @ Win32VersionValue
|
||||
|
|
|
@ -36,8 +36,8 @@ extra_header_fields:
|
|||
.long PECOFF_FILE_ALIGNMENT // FileAlignment
|
||||
.short 0 // MajorOperatingSystemVersion
|
||||
.short 0 // MinorOperatingSystemVersion
|
||||
.short 0 // MajorImageVersion
|
||||
.short 0 // MinorImageVersion
|
||||
.short LINUX_EFISTUB_MAJOR_VERSION // MajorImageVersion
|
||||
.short LINUX_EFISTUB_MINOR_VERSION // MinorImageVersion
|
||||
.short 0 // MajorSubsystemVersion
|
||||
.short 0 // MinorSubsystemVersion
|
||||
.long 0 // Win32VersionValue
|
||||
|
|
|
@ -147,8 +147,8 @@ extra_header_fields:
|
|||
.long 0x20 # FileAlignment
|
||||
.word 0 # MajorOperatingSystemVersion
|
||||
.word 0 # MinorOperatingSystemVersion
|
||||
.word 0 # MajorImageVersion
|
||||
.word 0 # MinorImageVersion
|
||||
.word LINUX_EFISTUB_MAJOR_VERSION # MajorImageVersion
|
||||
.word LINUX_EFISTUB_MINOR_VERSION # MinorImageVersion
|
||||
.word 0 # MajorSubsystemVersion
|
||||
.word 0 # MinorSubsystemVersion
|
||||
.long 0 # Win32VersionValue
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define LINUX_EFISTUB_MAJOR_VERSION 0x0
|
||||
#define LINUX_EFISTUB_MINOR_VERSION 0x0
|
||||
|
||||
#define MZ_MAGIC 0x5a4d /* "MZ" */
|
||||
|
||||
#define PE_MAGIC 0x00004550 /* "PE\0\0" */
|
||||
|
|
Загрузка…
Ссылка в новой задаче