Lines Matching +full:no +full:- +full:map

4  * SPDX-License-Identifier: BSD-2-Clause
19 vm_paddr_t efi_map_phys_dst; /* From our memory map metadata module */
28 /* Note: This is useless since runtime-map is a subset */
34 struct efi_md *map; /* Really an array */
41 * through entries - 1.
45 snprintf(fn, sizeof(fn), "/sys/firmware/efi/runtime-map/%d/phys_addr", entries++);
54 entries--;
65 map = (struct efi_md *)(buf + efisz);
66 bzero(map, sz);
67 efi_map_hdr->memory_size = map_size;
68 efi_map_hdr->descriptor_size = sizeof(struct efi_md);
69 efi_map_hdr->descriptor_version = EFI_MEMORY_DESCRIPTOR_VERSION;
74 m = map + i;
75 snprintf(fn, sizeof(fn), "/sys/firmware/efi/runtime-map/%d/type", i);
76 if (!file2u32(fn, &m->md_type))
78 snprintf(fn, sizeof(fn), "/sys/firmware/efi/runtime-map/%d/phys_addr", i);
79 if (!file2u64(fn, &m->md_phys))
81 snprintf(fn, sizeof(fn), "/sys/firmware/efi/runtime-map/%d/virt_addr", i);
82 if (!file2u64(fn, &m->md_virt))
84 snprintf(fn, sizeof(fn), "/sys/firmware/efi/runtime-map/%d/num_pages", i);
85 if (!file2u64(fn, &m->md_pages))
87 snprintf(fn, sizeof(fn), "/sys/firmware/efi/runtime-map/%d/attribute", i);
88 if (!file2u64(fn, &m->md_attr))
92 printf("UEFI MAP:\n");
97 printf("Parse error in reading current memory map\n");
102 * We may have no ability to read the PA that this map is in, so pass
103 * the address to FreeBSD via a rather odd flag entry as the first map
104 * so early boot can copy the memory map into this space and have the
113 struct efi_md *map; /* Really an array */ in efi_read_from_pa() local
116 * We may have no ability to read the PA that this map is in, so pass in efi_read_from_pa()
117 * the address to FreeBSD via a rather odd flag entry as the first map in efi_read_from_pa()
118 * so early boot can copy the memory map into this space and have the in efi_read_from_pa()
129 map = (struct efi_md *)(buf + efisz); in efi_read_from_pa()
130 bzero(map, sz); in efi_read_from_pa()
131 efi_map_hdr->memory_size = map_size; in efi_read_from_pa()
132 efi_map_hdr->descriptor_size = desc_size; in efi_read_from_pa()
133 efi_map_hdr->descriptor_version = vers; in efi_read_from_pa()
136 * Try to read in the actual UEFI map. This may fail, and that's OK. We just in efi_read_from_pa()
137 * won't print the map. in efi_read_from_pa()
144 len = read(fd2, map, sz); in efi_read_from_pa()
149 printf("UEFI MAP:\n"); in efi_read_from_pa()
162 struct efi_md *map, *p; in foreach_efi_map_entry() local
167 * Memory map data provided by UEFI via the GetMemoryMap in foreach_efi_map_entry()
171 map = (struct efi_md *)((uint8_t *)efihdr + efisz); in foreach_efi_map_entry()
173 if (efihdr->descriptor_size == 0) in foreach_efi_map_entry()
175 ndesc = efihdr->memory_size / efihdr->descriptor_size; in foreach_efi_map_entry()
177 for (i = 0, p = map; i < ndesc; i++, in foreach_efi_map_entry()
178 p = efi_next_descriptor(p, efihdr->descriptor_size)) { in foreach_efi_map_entry()
206 if (p->md_type < nitems(types)) in print_efi_map_entry()
207 type = types[p->md_type]; in print_efi_map_entry()
210 printf("%23s %012lx %012lx %08lx ", type, p->md_phys, in print_efi_map_entry()
211 p->md_virt, p->md_pages); in print_efi_map_entry()
212 if (p->md_attr & EFI_MD_ATTR_UC) in print_efi_map_entry()
214 if (p->md_attr & EFI_MD_ATTR_WC) in print_efi_map_entry()
216 if (p->md_attr & EFI_MD_ATTR_WT) in print_efi_map_entry()
218 if (p->md_attr & EFI_MD_ATTR_WB) in print_efi_map_entry()
220 if (p->md_attr & EFI_MD_ATTR_UCE) in print_efi_map_entry()
222 if (p->md_attr & EFI_MD_ATTR_WP) in print_efi_map_entry()
224 if (p->md_attr & EFI_MD_ATTR_RP) in print_efi_map_entry()
226 if (p->md_attr & EFI_MD_ATTR_XP) in print_efi_map_entry()
228 if (p->md_attr & EFI_MD_ATTR_NV) in print_efi_map_entry()
230 if (p->md_attr & EFI_MD_ATTR_MORE_RELIABLE) in print_efi_map_entry()
232 if (p->md_attr & EFI_MD_ATTR_RO) in print_efi_map_entry()
234 if (p->md_attr & EFI_MD_ATTR_RT) in print_efi_map_entry()
259 * memory map lives. The trampoline code will copy it over. If we don't in efi_bi_loadsmap()
260 * have it, panic because /proc/iomem isn't sufficient and there's no in efi_bi_loadsmap()
268 panic("Can't get UEFI memory map, nor a pointer to it, can't proceed.\n"); in efi_bi_loadsmap()