Home | History | Annotate | Download | only in efiboot

Lines Matching refs:md

56 getmemtype(EFI_MEMORY_DESCRIPTOR *md)
59 switch (md->Type) {
65 return (md->Attribute & EFI_MEMORY_WB) ?
94 EFI_MEMORY_DESCRIPTOR *desc, *md, *next, *target, *tmp;
110 for (i = 0, md = desc; i < *NoEntries - 1; i++, md = next) {
111 target = next = NextMemoryDescriptor(md, *DescriptorSize);
113 if (md->PhysicalStart > target->PhysicalStart) {
114 CopyMem(tmp, md, *DescriptorSize);
115 CopyMem(md, target, *DescriptorSize);
130 EFI_MEMORY_DESCRIPTOR *md, *next, *target, *tmp;
135 for (i = 0, md = target = desc; i < *NoEntries; i++, md = next) {
136 type = md->Type;
143 if ((md->Attribute & EFI_MEMORY_WB) != 0)
145 if (md->Attribute == target->Attribute) {
169 md->Attribute == target->Attribute &&
170 md->PhysicalStart == target->PhysicalStart + target->NumberOfPages * EFI_PAGE_SIZE) {
172 target->NumberOfPages += md->NumberOfPages;
174 tmp = md;
176 next = NextMemoryDescriptor(md, DescriptorSize);
177 CopyMem(md, next, DescriptorSize);
178 md = next;
186 target = md;
190 next = NextMemoryDescriptor(md, DescriptorSize);
200 EFI_MEMORY_DESCRIPTOR *mdtop, *md, *next;
217 for (i = 0, md = mdtop; i < NoEntries; i++, md = next) {
218 memmap[i].addr = md->PhysicalStart;
219 memmap[i].size = md->NumberOfPages * EFI_PAGE_SIZE;
220 memmap[i].type = getmemtype(md);
222 next = NextMemoryDescriptor(md, DescriptorSize);
236 EFI_MEMORY_DESCRIPTOR *mdtop, *md, *next;
244 for (i = 0, md = mdtop; i < NoEntries; i++, md = next) {
245 next = NextMemoryDescriptor(md, DescriptorSize);
246 if (getmemtype(md) != BIM_Memory)
248 if (md->PhysicalStart >= 1 * 1024 * 1024)
250 if (basemem != md->PhysicalStart)
253 MappingSize = md->NumberOfPages * EFI_PAGE_SIZE;
254 epa = md->PhysicalStart + MappingSize;
271 EFI_MEMORY_DESCRIPTOR *mdtop, *md, *next;
283 for (i = 0, md = mdtop; i < NoEntries; i++, md = next) {
284 next = NextMemoryDescriptor(md, DescriptorSize);
285 if (getmemtype(md) == BIM_Reserved)
287 if (md->PhysicalStart >= 4 * 1024 * 1024 * 1024ULL)
290 MappingSize = md->NumberOfPages * EFI_PAGE_SIZE;
291 epa = md->PhysicalStart + MappingSize;
298 pa = md->PhysicalStart;
331 EFI_MEMORY_DESCRIPTOR *mdtop, *md, *next;
348 for (i = 0, n = 0, md = mdtop; i < NoEntries; i++, md = next) {
349 next = NextMemoryDescriptor(md, DescriptorSize);
351 memtype = getmemtype(md);
355 MappingSize = md->NumberOfPages * EFI_PAGE_SIZE;
361 printf("0x%" PRIxMAX "-0x%" PRIxMAX, (uintmax_t)md->PhysicalStart,
362 (uintmax_t)(md->PhysicalStart + MappingSize - 1));
373 EFI_MEMORY_DESCRIPTOR *mdtop, *md, *next;
395 for (i = 0, md = mdtop; i < NoEntries; i++, md = next) {
396 next = NextMemoryDescriptor(md, DescriptorSize);
398 if (md->Type >= __arraycount(efi_memory_type))
400 md->Type);
402 md->Type >= __arraycount(efi_memory_type) ?
403 efimemstr : efi_memory_type[md->Type],
404 (uintmax_t)md->PhysicalStart,
405 (uintmax_t)md->PhysicalStart +
406 md->NumberOfPages * EFI_PAGE_SIZE - 1,
407 (uintmax_t)md->Attribute);