Lines Matching +full:memory +full:- +full:mapped

1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
12 #include <as-layout.h>
19 static int physmem_fd = -1;
46 if (err == -ENOMEM) in map_memory()
49 "memory size>/4096\n"); in map_memory()
56 * setup_physmem() - Setup physical memory for UML
57 * @start: Start address of the physical kernel memory,
59 * @reserve_end: end address of the physical kernel memory.
60 * @len: Length of total physical memory that should be mapped/made
63 * Creates an unlinked temporary file of size (len) and memory maps
66 * The offset is needed as the length of the total physical memory
67 * (len) includes the size of the memory used be the executable image,
68 * but the mapped-to address is the last address of the executable image
71 * The memory mapped memory of the temporary file is used as backing memory
77 unsigned long reserve = reserve_end - start; in setup_physmem()
78 unsigned long map_size = len - reserve; in setup_physmem()
82 os_warn("Too few physical memory! Needed=%lu, given=%lu\n", in setup_physmem()
92 os_warn("setup_physmem - mapping %lu bytes of memory at 0x%p " in setup_physmem()
93 "failed - errno = %d\n", map_size, in setup_physmem()
99 * Special kludge - This page will be mapped in to userspace processes in setup_physmem()
114 int fd = -1; in phys_mapping()
124 if ((phys >= region->phys) && in phys_mapping()
125 (phys < region->phys + region->size)) { in phys_mapping()
126 fd = region->fd; in phys_mapping()
127 *offset_out = phys - region->phys; in phys_mapping()
130 region = region->next; in phys_mapping()
148 " This controls how much \"physical\" memory the kernel allocates\n"
151 " This is not related to the amount of memory in the host. It can\n"
158 " Configure <file> as an IO memory region named <name>.\n\n"
176 if (!strcmp(region->driver, driver)) { in find_iomem()
177 *len_out = region->size; in find_iomem()
178 return region->virt; in find_iomem()
181 region = region->next; in find_iomem()
195 err = os_map_memory((void *) iomem_start, region->fd, 0, in setup_iomem()
196 region->size, 1, 1, 0); in setup_iomem()
199 "failed, errno = %d\n", region->driver, -err); in setup_iomem()
201 region->virt = iomem_start; in setup_iomem()
202 region->phys = __pa(region->virt); in setup_iomem()
205 iomem_start += region->size + PAGE_SIZE; in setup_iomem()
206 region = region->next; in setup_iomem()