|
35 | 35 | * as well to minimize the code churn. |
36 | 36 | */ |
37 | 37 | #define EFI_RT_VIRTUAL_BASE SZ_512M |
38 | | -#define EFI_RT_VIRTUAL_SIZE SZ_512M |
39 | | - |
40 | | -#ifdef CONFIG_ARM64 |
41 | | -# define EFI_RT_VIRTUAL_LIMIT DEFAULT_MAP_WINDOW_64 |
42 | | -#elif defined(CONFIG_RISCV) || defined(CONFIG_LOONGARCH) |
43 | | -# define EFI_RT_VIRTUAL_LIMIT TASK_SIZE_MIN |
44 | | -#else /* Only if TASK_SIZE is a constant */ |
45 | | -# define EFI_RT_VIRTUAL_LIMIT TASK_SIZE |
46 | | -#endif |
47 | 38 |
|
48 | 39 | /* |
49 | 40 | * Some architectures map the EFI regions into the kernel's linear map using a |
@@ -230,26 +221,6 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle, |
230 | 221 | efi_novamap |= !(get_supported_rt_services() & |
231 | 222 | EFI_RT_SUPPORTED_SET_VIRTUAL_ADDRESS_MAP); |
232 | 223 |
|
233 | | - /* hibernation expects the runtime regions to stay in the same place */ |
234 | | - if (!IS_ENABLED(CONFIG_HIBERNATION) && !efi_nokaslr && !flat_va_mapping) { |
235 | | - /* |
236 | | - * Randomize the base of the UEFI runtime services region. |
237 | | - * Preserve the 2 MB alignment of the region by taking a |
238 | | - * shift of 21 bit positions into account when scaling |
239 | | - * the headroom value using a 32-bit random value. |
240 | | - */ |
241 | | - static const u64 headroom = EFI_RT_VIRTUAL_LIMIT - |
242 | | - EFI_RT_VIRTUAL_BASE - |
243 | | - EFI_RT_VIRTUAL_SIZE; |
244 | | - u32 rnd; |
245 | | - |
246 | | - status = efi_get_random_bytes(sizeof(rnd), (u8 *)&rnd); |
247 | | - if (status == EFI_SUCCESS) { |
248 | | - virtmap_base = EFI_RT_VIRTUAL_BASE + |
249 | | - (((headroom >> 21) * rnd) >> (32 - 21)); |
250 | | - } |
251 | | - } |
252 | | - |
253 | 224 | install_memreserve_table(); |
254 | 225 |
|
255 | 226 | status = efi_boot_kernel(handle, image, image_addr, cmdline_ptr); |
|
0 commit comments