Lines Matching +full:reserved +full:- +full:memory
1 // SPDX-License-Identifier: GPL-2.0-only
16 #include <on-cpus.h>
89 phys_addr_t freemem_end = freemem->end; in mem_allocator_init()
96 * The assert below is mostly checking that the free memory doesn't in mem_allocator_init()
97 * start in the 3G-4G range, which is reserved for virtual addresses, in mem_allocator_init()
98 * but it also confirms that there is some free memory (the amount in mem_allocator_init()
109 rest->flags = MR_F_UNUSED; in mem_allocator_init()
111 assert(freemem_end - freemem_start >= SZ_1M * 16); in mem_allocator_init()
120 phys_alloc_init(freemem_start, freemem_end - freemem_start); in mem_allocator_init()
139 code->flags |= MR_F_CODE; in mem_init()
142 assert(freemem && !(freemem->flags & (MR_F_IO | MR_F_CODE))); in mem_init()
166 assert(ret == 0 || ret == -FDT_ERR_NOTFOUND); in freemem_push_dt_initrd()
191 puts("# kvm-unit-tests\n"); in banner()
216 assert(ret == 0 || ret == -FDT_ERR_NOTFOUND); in setup()
240 memregions_efi_init(&efi_bootinfo->mem_map, &freemem_mr); in efi_mem_init()
245 assert(code && (code->flags & MR_F_CODE)); in efi_mem_init()
247 data->flags &= ~MR_F_CODE; in efi_mem_init()
249 for (struct mem_region *m = mem_regions; m->end; ++m) in efi_mem_init()
250 assert(m == code || !(m->flags & MR_F_CODE)); in efi_mem_init()
252 freemem = (void *)PAGE_ALIGN(freemem_mr->start); in efi_mem_init()
254 if (efi_bootinfo->fdt) in efi_mem_init()
255 freemem_push_fdt(&freemem, efi_bootinfo->fdt); in efi_mem_init()
272 printf("Failed to initialize memory\n"); in setup_efi()