Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

efi/x86: Remove runtime table address from kexec EFI setup data

Since commit 33b85447fa61946b ("efi/x86: Drop two near identical versions
of efi_runtime_init()"), we no longer map the EFI runtime services table
before calling SetVirtualAddressMap(), which means we don't need the 1:1
mapped physical address of this table, and so there is no point in passing
the address via EFI setup data on kexec boot.

Note that the kexec tools will still look for this address in sysfs, so
we still need to provide it.

Tested-by: Tony Luck <tony.luck@intel.com> # arch/ia64
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

+1 -5
-1
arch/x86/include/asm/efi.h
··· 178 178 179 179 struct efi_setup_data { 180 180 u64 fw_vendor; 181 - u64 runtime; 182 181 u64 tables; 183 182 u64 smbios; 184 183 u64 reserved[8];
-1
arch/x86/kernel/kexec-bzimage64.c
··· 142 142 struct efi_setup_data *esd = (void *)sd + sizeof(struct setup_data); 143 143 144 144 esd->fw_vendor = efi.fw_vendor; 145 - esd->runtime = efi.runtime; 146 145 esd->tables = efi.config_table; 147 146 esd->smbios = efi.smbios; 148 147
+1 -3
arch/x86/platform/efi/efi.c
··· 376 376 systab64->con_out > U32_MAX || 377 377 systab64->stderr_handle > U32_MAX || 378 378 systab64->stderr > U32_MAX || 379 + systab64->runtime > U32_MAX || 379 380 systab64->boottime > U32_MAX; 380 381 381 382 if (efi_setup) { ··· 389 388 } 390 389 391 390 efi_systab.fw_vendor = (unsigned long)data->fw_vendor; 392 - efi_systab.runtime = (void *)(unsigned long)data->runtime; 393 391 efi_systab.tables = (unsigned long)data->tables; 394 392 395 393 over4g |= data->fw_vendor > U32_MAX || 396 - data->runtime > U32_MAX || 397 394 data->tables > U32_MAX; 398 395 399 396 early_memunmap(data, sizeof(*data)); 400 397 } else { 401 398 over4g |= systab64->fw_vendor > U32_MAX || 402 - systab64->runtime > U32_MAX || 403 399 systab64->tables > U32_MAX; 404 400 } 405 401 } else {