Lines Matching refs:md
29 static int __init is_memory(efi_memory_desc_t *md) in is_memory() argument
31 if (md->attribute & (EFI_MEMORY_WB|EFI_MEMORY_WT|EFI_MEMORY_WC)) in is_memory()
43 efi_memory_desc_t *md; in efi_to_phys() local
45 for_each_efi_memory_desc(md) { in efi_to_phys()
46 if (!(md->attribute & EFI_MEMORY_RUNTIME)) in efi_to_phys()
48 if (md->virt_addr == 0) in efi_to_phys()
51 if (md->virt_addr <= addr && in efi_to_phys()
52 (addr - md->virt_addr) < (md->num_pages << EFI_PAGE_SHIFT)) in efi_to_phys()
53 return md->phys_addr + addr - md->virt_addr; in efi_to_phys()
160 static __init int is_usable_memory(efi_memory_desc_t *md) in is_usable_memory() argument
162 switch (md->type) { in is_usable_memory()
175 return (md->attribute & EFI_MEMORY_WB); in is_usable_memory()
184 efi_memory_desc_t *md; in reserve_regions() local
198 for_each_efi_memory_desc(md) { in reserve_regions()
199 paddr = md->phys_addr; in reserve_regions()
200 npages = md->num_pages; in reserve_regions()
207 efi_md_typeattr_format(buf, sizeof(buf), md)); in reserve_regions()
213 if (is_memory(md)) { in reserve_regions()
216 if (!is_usable_memory(md)) in reserve_regions()
220 if (md->type == EFI_ACPI_RECLAIM_MEMORY) in reserve_regions()