Skip to content

Commit a088b85

Browse files
ardbiesheuvelIngo Molnar
authored andcommitted
efi/x86: Revert struct layout change to fix kexec boot regression
Commit 0a67361 ("efi/x86: Remove runtime table address from kexec EFI setup data") removed the code that retrieves the non-remapped UEFI runtime services pointer from the data structure provided by kexec, as it was never really needed on the kexec boot path: mapping the runtime services table at its non-remapped address is only needed when calling SetVirtualAddressMap(), which never happens during a kexec boot in the first place. However, dropping the 'runtime' member from struct efi_setup_data was a mistake. That struct is shared ABI between the kernel and the kexec tooling for x86, and so we cannot simply change its layout. So let's put back the removed field, but call it 'unused' to reflect the fact that we never look at its contents. While at it, add a comment to remind our future selves that the layout is external ABI. Fixes: 0a67361 ("efi/x86: Remove runtime table address from kexec EFI setup data") Reported-by: Theodore Ts'o <[email protected]> Tested-by: Theodore Ts'o <[email protected]> Reviewed-by: Dave Young <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent f610316 commit a088b85

File tree

1 file changed

+2
-0
lines changed
  • arch/x86/include/asm

1 file changed

+2
-0
lines changed

arch/x86/include/asm/efi.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,10 @@ extern void efi_free_boot_services(void);
178178
extern pgd_t * __init efi_uv1_memmap_phys_prolog(void);
179179
extern void __init efi_uv1_memmap_phys_epilog(pgd_t *save_pgd);
180180

181+
/* kexec external ABI */
181182
struct efi_setup_data {
182183
u64 fw_vendor;
184+
u64 __unused;
183185
u64 tables;
184186
u64 smbios;
185187
u64 reserved[8];

0 commit comments

Comments
 (0)