Lines Matching refs:md
17 static unsigned long get_entry_num_slots(efi_memory_desc_t *md, in get_entry_num_slots() argument
24 if (md->type != EFI_CONVENTIONAL_MEMORY) in get_entry_num_slots()
28 (md->attribute & EFI_MEMORY_SP)) in get_entry_num_slots()
31 region_end = min(md->phys_addr + md->num_pages * EFI_PAGE_SIZE - 1, in get_entry_num_slots()
36 first_slot = round_up(md->phys_addr, align); in get_entry_num_slots()
51 #define MD_NUM_SLOTS(md) ((md)->virt_addr) argument
83 efi_memory_desc_t *md = (void *)memory_map + map_offset; in efi_random_alloc() local
86 slots = get_entry_num_slots(md, size, ilog2(align)); in efi_random_alloc()
87 MD_NUM_SLOTS(md) = slots; in efi_random_alloc()
106 efi_memory_desc_t *md = (void *)memory_map + map_offset; in efi_random_alloc() local
110 if (target_slot >= MD_NUM_SLOTS(md)) { in efi_random_alloc()
111 target_slot -= MD_NUM_SLOTS(md); in efi_random_alloc()
115 target = round_up(md->phys_addr, align) + target_slot * align; in efi_random_alloc()