summaryrefslogtreecommitdiff
path: root/drivers/firmware/efi/libstub/zboot-header.S
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2025-05-21 15:32:06 +0200
committerArd Biesheuvel <ardb@kernel.org>2025-05-21 15:32:06 +0200
commit857faddd16c52b267da6519ba03d4578046f056f (patch)
treec1fea78207ff1bd0f2ac43975fb323dda005beac /drivers/firmware/efi/libstub/zboot-header.S
parentc8e1927e7f7d63721e32ec41d27ccb0eb1a1b0fc (diff)
parent0f9a1739dd0e1ca3942e51dc3ec18f0d68c23be5 (diff)
Merge branch 'efi-sbat' into efi/next
Diffstat (limited to 'drivers/firmware/efi/libstub/zboot-header.S')
-rw-r--r--drivers/firmware/efi/libstub/zboot-header.S22
1 files changed, 20 insertions, 2 deletions
diff --git a/drivers/firmware/efi/libstub/zboot-header.S b/drivers/firmware/efi/libstub/zboot-header.S
index fb676ded47fa..e02247458b65 100644
--- a/drivers/firmware/efi/libstub/zboot-header.S
+++ b/drivers/firmware/efi/libstub/zboot-header.S
@@ -123,11 +123,29 @@ __efistub_efi_zboot_header:
IMAGE_SCN_MEM_READ | \
IMAGE_SCN_MEM_EXECUTE
+#ifdef CONFIG_EFI_SBAT
+ .ascii ".sbat\0\0\0"
+ .long __sbat_size
+ .long _sbat - .Ldoshdr
+ .long __sbat_size
+ .long _sbat - .Ldoshdr
+
+ .long 0, 0
+ .short 0, 0
+ .long IMAGE_SCN_CNT_INITIALIZED_DATA | \
+ IMAGE_SCN_MEM_READ | \
+ IMAGE_SCN_MEM_DISCARDABLE
+
+ .pushsection ".sbat", "a", @progbits
+ .incbin CONFIG_EFI_SBAT_FILE
+ .popsection
+#endif
+
.ascii ".data\0\0\0"
.long __data_size
- .long _etext - .Ldoshdr
+ .long _data - .Ldoshdr
.long __data_rawsize
- .long _etext - .Ldoshdr
+ .long _data - .Ldoshdr
.long 0, 0
.short 0, 0