Lines Matching refs:md

280 		efi_memory_desc_t *md;  in efi_mem_desc_lookup()  local
290 md = early_memremap(p, sizeof (*md)); in efi_mem_desc_lookup()
291 if (!md) { in efi_mem_desc_lookup()
293 &p, sizeof (*md)); in efi_mem_desc_lookup()
297 if (!(md->attribute & EFI_MEMORY_RUNTIME) && in efi_mem_desc_lookup()
298 md->type != EFI_BOOT_SERVICES_DATA && in efi_mem_desc_lookup()
299 md->type != EFI_RUNTIME_SERVICES_DATA) { in efi_mem_desc_lookup()
300 early_memunmap(md, sizeof (*md)); in efi_mem_desc_lookup()
304 size = md->num_pages << EFI_PAGE_SHIFT; in efi_mem_desc_lookup()
305 end = md->phys_addr + size; in efi_mem_desc_lookup()
306 if (phys_addr >= md->phys_addr && phys_addr < end) { in efi_mem_desc_lookup()
307 memcpy(out_md, md, sizeof(*out_md)); in efi_mem_desc_lookup()
308 early_memunmap(md, sizeof (*md)); in efi_mem_desc_lookup()
312 early_memunmap(md, sizeof (*md)); in efi_mem_desc_lookup()
321 u64 __init efi_mem_desc_end(efi_memory_desc_t *md) in efi_mem_desc_end() argument
323 u64 size = md->num_pages << EFI_PAGE_SHIFT; in efi_mem_desc_end()
324 u64 end = md->phys_addr + size; in efi_mem_desc_end()
343 efi_memory_desc_t *md = p; in efi_lookup_mapped_addr() local
344 u64 size = md->num_pages << EFI_PAGE_SHIFT; in efi_lookup_mapped_addr()
345 u64 end = md->phys_addr + size; in efi_lookup_mapped_addr()
346 if (!(md->attribute & EFI_MEMORY_RUNTIME) && in efi_lookup_mapped_addr()
347 md->type != EFI_BOOT_SERVICES_CODE && in efi_lookup_mapped_addr()
348 md->type != EFI_BOOT_SERVICES_DATA) in efi_lookup_mapped_addr()
350 if (!md->virt_addr) in efi_lookup_mapped_addr()
352 if (phys_addr >= md->phys_addr && phys_addr < end) { in efi_lookup_mapped_addr()
353 phys_addr += md->virt_addr - md->phys_addr; in efi_lookup_mapped_addr()
592 const efi_memory_desc_t *md) in efi_md_typeattr_format() argument
599 if (md->type >= ARRAY_SIZE(memory_type_name)) in efi_md_typeattr_format()
600 type_len = snprintf(pos, size, "[type=%u", md->type); in efi_md_typeattr_format()
604 memory_type_name[md->type]); in efi_md_typeattr_format()
611 attr = md->attribute; in efi_md_typeattr_format()
650 efi_memory_desc_t *md; in efi_mem_attributes() local
658 md = p; in efi_mem_attributes()
659 if ((md->phys_addr <= phys_addr) && in efi_mem_attributes()
660 (phys_addr < (md->phys_addr + in efi_mem_attributes()
661 (md->num_pages << EFI_PAGE_SHIFT)))) in efi_mem_attributes()
662 return md->attribute; in efi_mem_attributes()