Lines Matching refs:md
27 static int __init is_memory(efi_memory_desc_t *md)
29 if (md->attribute & (EFI_MEMORY_WB|EFI_MEMORY_WT|EFI_MEMORY_WC))
41 efi_memory_desc_t *md;
43 for_each_efi_memory_desc(md) {
44 if (!(md->attribute & EFI_MEMORY_RUNTIME))
46 if (md->virt_addr == 0)
49 if (md->virt_addr <= addr &&
50 (addr - md->virt_addr) < (md->num_pages << EFI_PAGE_SHIFT))
51 return md->phys_addr + addr - md->virt_addr;
136 static __init int is_usable_memory(efi_memory_desc_t *md)
138 switch (md->type) {
151 return (md->attribute & EFI_MEMORY_WB);
160 efi_memory_desc_t *md;
174 for_each_efi_memory_desc(md) {
175 paddr = md->phys_addr;
176 npages = md->num_pages;
183 efi_md_typeattr_format(buf, sizeof(buf), md));
189 if (is_memory(md)) {
197 (md->attribute & EFI_MEMORY_SP))
202 if (!is_usable_memory(md))
206 if (md->type == EFI_ACPI_RECLAIM_MEMORY)