Lines Matching refs:desc
70 struct efi_mem_desc *desc, *end, *base, *dest, *prev; in efi_build_mem_table() local
74 base = malloc(size + sizeof(*desc)); in efi_build_mem_table()
80 count = ((ulong)end - (ulong)map->desc) / map->desc_size; in efi_build_mem_table()
81 memcpy(base, map->desc, (ulong)end - (ulong)map->desc); in efi_build_mem_table()
87 for (desc = base; desc < end; desc = efi_get_next_mem_desc(map, desc)) { in efi_build_mem_table()
89 int type = desc->type; in efi_build_mem_table()
91 if (skip_bs && is_boot_services(desc->type)) in efi_build_mem_table()
94 memcpy(dest, desc, map->desc_size); in efi_build_mem_table()
98 else if (desc->physical_start != addr) in efi_build_mem_table()
106 prev->num_pages += desc->num_pages; in efi_build_mem_table()
111 addr = desc->physical_start + (desc->num_pages << in efi_build_mem_table()
122 struct efi_mem_desc *desc, bool skip_bs) in efi_print_mem_table() argument
135 for (upto = 0; desc->type != EFI_TABLE_END; in efi_print_mem_table()
136 upto++, desc = efi_get_next_mem_desc(map, desc)) { in efi_print_mem_table()
140 if (skip_bs && is_boot_services(desc->type)) in efi_print_mem_table()
142 if (desc->physical_start != addr) { in efi_print_mem_table()
144 addr, "", desc->physical_start - addr); in efi_print_mem_table()
146 size = desc->num_pages << EFI_PAGE_SHIFT; in efi_print_mem_table()
148 name = desc->type < ARRAY_SIZE(type_name) ? in efi_print_mem_table()
149 type_name[desc->type] : "<invalid>"; in efi_print_mem_table()
151 desc->type, name, desc->physical_start, in efi_print_mem_table()
152 desc->virtual_start, size); in efi_print_mem_table()
153 if (desc->attribute & EFI_MEMORY_RUNTIME) in efi_print_mem_table()
155 printf("%llx", desc->attribute & ~EFI_MEMORY_RUNTIME); in efi_print_mem_table()
159 if (attr_seen[i] == desc->attribute) in efi_print_mem_table()
163 attr_seen[attr_seen_count++] = desc->attribute; in efi_print_mem_table()
164 addr = desc->physical_start + size; in efi_print_mem_table()
192 struct efi_mem_desc *desc; in do_efi_mem() local
215 desc = efi_build_mem_table(map, size, skip_bs); in do_efi_mem()
216 if (!desc) { in do_efi_mem()
221 efi_print_mem_table(map, desc, skip_bs); in do_efi_mem()
222 free(desc); in do_efi_mem()