Lines Matching +full:preserved +full:- +full:memory +full:- +full:map

1 // SPDX-License-Identifier: GPL-2.0
5 #include <asm/page-states.h>
42 u64 __bootdata_preserved(clock_comparator_max) = -1UL;
50 boot_emerg(" -- System halted\n"); in error()
60 /* Check current-configuration-level */ in detect_machine_type()
65 /* Get virtual-machine cpu information. */ in detect_machine_type()
66 if (stsi(vmms, 3, 2, 2) || !vmms->count) in detect_machine_type()
69 if (!memcmp(vmms->vm[0].cpi, "\xd2\xe5\xd4", 3)) in detect_machine_type()
71 else if (!memcmp(vmms->vm[0].cpi, "\xa9\x61\xe5\xd4", 4)) in detect_machine_type()
102 : "cc", "memory"); in detect_diag9c()
118 get_lowcore()->last_update_clock = TOD_UNIX_EPOCH; in reset_tod_clock()
125 page_noexec_mask = -1UL; in detect_facilities()
126 segment_noexec_mask = -1UL; in detect_facilities()
127 region_noexec_mask = -1UL; in detect_facilities()
139 clock_comparator_max = -1UL >> 1; in detect_facilities()
163 : "cc", "memory"); in cmma_test_essa()
181 get_lowcore()->current_pid = 0; in setup_lpp()
182 get_lowcore()->lpp = LPP_MAGIC; in setup_lpp()
184 lpp(&get_lowcore()->lpp); in setup_lpp()
222 if (__boot_data_end - __boot_data_start != vmlinux.bootdata_size) in copy_bootdata()
225 if (__boot_data_preserved_end - __boot_data_preserved_start != vmlinux.bootdata_preserved_size) in copy_bootdata()
226 error(".boot.preserved.data section size mismatch"); in copy_bootdata()
240 error("64-bit relocation outside of kernel!\n"); in kaslr_adjust_relocs()
262 * "ident_map_size" represents the upper limit of physical memory we may ever
263 * reach. It might not be all online memory, but also include standby (offline)
264 * memory or memory areas reserved for other means (e.g., memory devices such as
265 * virtio-mem).
268 * memory present, due to limiting factors. We should never go above this limit.
272 * 1. max_physmem_end - end of physical memory online, standby or reserved.
273 * Always >= end of the last online memory range (get_physmem_online_end()).
274 * 2. CONFIG_MAX_PHYSMEM_BITS - the maximum size of physical memory the
276 * 3. "mem=" kernel command line option which limits physical memory usage.
277 * 4. OLDMEM_BASE which is a kdump memory limit when the kernel is executed as
279 * 5. "hsa" size which is a memory limit when the kernel is executed during
295 boot_debug("kdump memory limit: 0x%016lx\n", oldmem_data.size); in setup_ident_map_size()
300 boot_debug("Stand-alone dump limit: 0x%016lx\n", hsa_size); in setup_ident_map_size()
304 boot_debug("Identity map size: 0x%016lx\n", ident_map_size); in setup_ident_map_size()
371 boot_debug("KASAN shadow area: 0x%016lx-0x%016lx\n", KASAN_SHADOW_START, KASAN_SHADOW_END); in setup_kernel_memory_layout()
379 kaslr_len = max(KASLR_LEN, vmax - vsize); in setup_kernel_memory_layout()
380 slots = DIV_ROUND_UP(kaslr_len - kernel_size, THREAD_SIZE); in setup_kernel_memory_layout()
383 kernel_end = vmax - pos * THREAD_SIZE; in setup_kernel_memory_layout()
384 kernel_start = round_down(kernel_end - kernel_size, THREAD_SIZE); in setup_kernel_memory_layout()
385 boot_debug("Randomization range: 0x%016lx-0x%016lx\n", vmax - kaslr_len, vmax); in setup_kernel_memory_layout()
386 boot_debug("kernel image: 0x%016lx-0x%016lx (kaslr)\n", kernel_start, in setup_kernel_memory_layout()
389 kernel_start = round_down(vmax - kernel_size, THREAD_SIZE); in setup_kernel_memory_layout()
390 boot_debug("kernel image: 0x%016lx-0x%016lx (constrained)\n", kernel_start, in setup_kernel_memory_layout()
394 boot_debug("kernel image: 0x%016lx-0x%016lx (nokaslr)\n", kernel_start, in setup_kernel_memory_layout()
401 MODULES_VADDR = MODULES_END - MODULES_LEN; in setup_kernel_memory_layout()
404 VMALLOC_END -= MODULES_LEN * 2; in setup_kernel_memory_layout()
405 boot_debug("modules area: 0x%016lx-0x%016lx\n", MODULES_VADDR, MODULES_END); in setup_kernel_memory_layout()
408 vsize = (VMALLOC_END - FIXMAP_SIZE) / 2; in setup_kernel_memory_layout()
414 VMALLOC_END -= vmalloc_size * 2; in setup_kernel_memory_layout()
416 VMALLOC_START = VMALLOC_END - vmalloc_size; in setup_kernel_memory_layout()
417 boot_debug("vmalloc area: 0x%016lx-0x%016lx\n", VMALLOC_START, VMALLOC_END); in setup_kernel_memory_layout()
419 __memcpy_real_area = round_down(VMALLOC_START - MEMCPY_REAL_SIZE, PAGE_SIZE); in setup_kernel_memory_layout()
420 boot_debug("memcpy real area: 0x%016lx-0x%016lx\n", __memcpy_real_area, in setup_kernel_memory_layout()
422 __abs_lowcore = round_down(__memcpy_real_area - ABS_LOWCORE_MAP_SIZE, in setup_kernel_memory_layout()
424 boot_debug("abs lowcore: 0x%016lx-0x%016lx\n", __abs_lowcore, in setup_kernel_memory_layout()
431 vmemmap_start = round_down(__abs_lowcore - pages * sizeof(struct page), rte_size); in setup_kernel_memory_layout()
432 /* make sure identity map doesn't overlay with vmemmap */ in setup_kernel_memory_layout()
441 /* maximum address for which linear mapping could be created (DCSS, memory) */ in setup_kernel_memory_layout()
446 __identity_base = round_down(vmemmap_start - max_mappable, rte_size); in setup_kernel_memory_layout()
448 boot_debug("identity map: 0x%016lx-0x%016lx\n", __identity_base, in setup_kernel_memory_layout()
463 * Set vmalloc area size to an 8th of (potential) physical memory
514 * Non-randomized kernel physical start address must be _SEGMENT_SIZE in startup_kernel()
521 * Reserve decompressor memory together with decompression heap, in startup_kernel()
522 * buffer and memory which might be occupied by uncompressed kernel in startup_kernel()
580 __kaslr_offset_phys = text_lma - TEXT_OFFSET; in startup_kernel()
585 /* vmlinux decompression is done, shrink reserved low memory */ in startup_kernel()
593 * .amode31 section is written to by the decompressed kernel - at in startup_kernel()
606 amode31_lma = text_lma - vmlinux.amode31_size; in startup_kernel()
612 * - kaslr_adjust_relocs() must follow clear_bss_section() to establish in startup_kernel()
613 * static memory references to data in .bss to be used by setup_vmem() in startup_kernel()
616 * - setup_vmem() must follow kaslr_adjust_relocs() to be able using in startup_kernel()
617 * static memory references to data in .bss (i.e init_mm.pgd) in startup_kernel()
619 * - copy_bootdata() must follow setup_vmem() to propagate changes in startup_kernel()
637 get_lowcore()->vmcore_info = __kaslr_offset_phys ? __kaslr_offset_phys | 0x1UL : 0; in startup_kernel()