Lines Matching +full:secure +full:- +full:regions
1 // SPDX-License-Identifier: GPL-2.0-only
5 * This file contains the setup_arch() code, which handles the architecture-dependent
11 #include <linux/dma-map-ops.h>
23 #include <linux/usb/xhci-dbgp.h>
46 #include <asm/pci-direct.h>
58 * The direct mapping only covers E820_TYPE_RAM regions, so the ranges and gaps are
80 * These are the four main kernel memory regions, we put them into
177 * copy_edd() - Copy the BIOS EDD information
197 size_t mask = align - 1; in extend_brk()
224 _brk_end - _brk_start); in reserve_brk()
274 printk(KERN_INFO "Allocated new RAMDISK: [mem %#010llx-%#010llx]\n", in relocate_initrd()
275 relocated_ramdisk, relocated_ramdisk + ramdisk_size - 1); in relocate_initrd()
279 printk(KERN_INFO "Move RAMDISK from [mem %#010llx-%#010llx] to" in relocate_initrd()
280 " [mem %#010llx-%#010llx]\n", in relocate_initrd()
281 ramdisk_image, ramdisk_image + ramdisk_size - 1, in relocate_initrd()
282 relocated_ramdisk, relocated_ramdisk + ramdisk_size - 1); in relocate_initrd()
296 memblock_reserve(ramdisk_image, ramdisk_end - ramdisk_image); in early_reserve_initrd()
312 printk(KERN_INFO "RAMDISK: [mem %#010llx-%#010llx]\n", ramdisk_image, in reserve_initrd()
313 ramdisk_end - 1); in reserve_initrd()
325 memblock_free(ramdisk_image, ramdisk_end - ramdisk_image); in reserve_initrd()
347 data_len = data->len + sizeof(struct setup_data); in parse_setup_data()
348 data_type = data->type; in parse_setup_data()
349 pa_next = data->next; in parse_setup_data()
377 memblock_reserve(pa_data, sizeof(*data) + data->len); in memblock_x86_reserve_range_setup_data()
379 if (data->type == SETUP_INDIRECT && in memblock_x86_reserve_range_setup_data()
380 ((struct setup_indirect *)data->data)->type != SETUP_INDIRECT) in memblock_x86_reserve_range_setup_data()
381 memblock_reserve(((struct setup_indirect *)data->data)->addr, in memblock_x86_reserve_range_setup_data()
382 ((struct setup_indirect *)data->data)->len); in memblock_x86_reserve_range_setup_data()
384 pa_data = data->next; in memblock_x86_reserve_range_setup_data()
390 * --------- Crashkernel reservation ------------------------------
395 /* 16M alignment for crash kernel regions */
401 * Earlier 32-bits kernels would limit the kernel to the low 512 MB range
404 * 64-bit kdump kernels need to be restricted to be under 64 TB, which is
405 * the upper limit of system RAM in 4-level paging mode. Since the kdump
406 * jump could be from 5-level paging to 4-level paging, the jump will fail if
433 * -swiotlb size: user-specified with swiotlb= or default. in reserve_crashkernel_low()
435 * -swiotlb overflow buffer: now hardcoded to 32k. We round it in reserve_crashkernel_low()
438 * don't run out of DMA buffers for 32-bit devices. in reserve_crashkernel_low()
451 return -ENOMEM; in reserve_crashkernel_low()
460 crashk_low_res.end = low_base + low_size - 1; in reserve_crashkernel_low()
509 pr_info("crashkernel reservation failed - No suitable area found.\n"); in reserve_crashkernel()
518 pr_info("crashkernel reservation failed - memory is in use.\n"); in reserve_crashkernel()
534 crashk_res.end = crash_base + crash_size - 1; in reserve_crashkernel()
661 * area (640Kb -> 1Mb) as RAM even though it is not. in trim_bios_range()
664 e820__range_remove(BIOS_BEGIN, BIOS_END - BIOS_BEGIN, E820_TYPE_RAM, 1); in trim_bios_range()
673 u64 size = __pa_symbol(_end) - start; in e820_add_kernel_range()
679 * exclude kernel range. If we really are running on top non-RAM, in e820_add_kernel_range()
699 (unsigned long)__end_of_kernel_reserve - (unsigned long)_text); in early_reserve_memory()
733 pr_emerg("Kernel Offset: 0x%lx from 0x%lx (relocation range: 0x%lx-0x%lx)\n", in dump_kernel_offset()
737 MODULES_VADDR-1); in dump_kernel_offset()
753 * setup_arch - architecture-specific boot-time initializations
847 iomem_resource.end = (1ULL << boot_cpu_data.x86_phys_bits) - 1; in setup_arch()
858 code_resource.end = __pa_symbol(_etext)-1; in setup_arch()
860 rodata_resource.end = __pa_symbol(__end_rodata)-1; in setup_arch()
862 data_resource.end = __pa_symbol(_edata)-1; in setup_arch()
864 bss_resource.end = __pa_symbol(__bss_stop)-1; in setup_arch()
895 * Memory used by the kernel cannot be hot-removed because Linux in setup_arch()
905 * node the kernel resides in as un-hotpluggable. in setup_arch()
907 * Since on modern servers, one node could have double-digit in setup_arch()
909 * image is also un-hotpluggable. So before SRAT is parsed, just in setup_arch()
964 * partially used pages are not usable - thus in setup_arch()
995 /* How many end-of-memory variables you have, grandma! */ in setup_arch()
997 if (max_pfn > (1UL<<(32 - PAGE_SHIFT))) in setup_arch()
1002 high_memory = (void *)__va(max_pfn * PAGE_SIZE - 1) + 1; in setup_arch()
1006 * Find and reserve possible boot-time SMP configuration: in setup_arch()
1049 printk(KERN_DEBUG "initial memory mapped: [mem 0x00000000-%#010lx]\n", in setup_arch()
1050 (max_pfn_mapped<<PAGE_SHIFT) - 1); in setup_arch()
1055 * there is not enough free memory under 1M, on EFI-enabled systems in setup_arch()
1076 * auditing all the early-boot CR4 manipulation would be needed to in setup_arch()
1087 * NOTE: On x86-32, only from this point on, fixmaps are ready for use. in setup_arch()
1100 pr_info("Secure boot disabled\n"); in setup_arch()
1103 pr_info("Secure boot enabled\n"); in setup_arch()
1106 pr_info("Secure boot could not be determined\n"); in setup_arch()
1129 hugetlb_cma_reserve(PUD_SHIFT - PAGE_SHIFT); in setup_arch()
1169 * get boot-time SMP configuration: in setup_arch()
1206 * This needs to run before setup_local_APIC() which soft-disables the in setup_arch()