Lines Matching refs:desc
73 struct efi_mem_desc *desc, *end, *base, *dest, *prev; in efi_build_mem_table() local
77 base = malloc(size + sizeof(*desc)); in efi_build_mem_table()
83 count = ((ulong)end - (ulong)map->desc) / map->desc_size; in efi_build_mem_table()
84 memcpy(base, map->desc, (ulong)end - (ulong)map->desc); in efi_build_mem_table()
90 for (desc = base; desc < end; desc = efi_get_next_mem_desc(map, desc)) { in efi_build_mem_table()
92 int type = desc->type; in efi_build_mem_table()
94 if (skip_bs && is_boot_services(desc->type)) in efi_build_mem_table()
97 memcpy(dest, desc, map->desc_size); in efi_build_mem_table()
101 else if (desc->physical_start != addr) in efi_build_mem_table()
109 prev->num_pages += desc->num_pages; in efi_build_mem_table()
114 addr = desc->physical_start + (desc->num_pages << in efi_build_mem_table()
125 struct efi_mem_desc *desc, bool skip_bs) in efi_print_mem_table() argument
138 for (upto = 0; desc->type != EFI_TABLE_END; in efi_print_mem_table()
139 upto++, desc = efi_get_next_mem_desc(map, desc)) { in efi_print_mem_table()
143 if (skip_bs && is_boot_services(desc->type)) in efi_print_mem_table()
145 if (desc->physical_start != addr) { in efi_print_mem_table()
147 addr, "", desc->physical_start - addr); in efi_print_mem_table()
149 size = desc->num_pages << EFI_PAGE_SHIFT; in efi_print_mem_table()
151 name = desc->type < ARRAY_SIZE(type_name) ? in efi_print_mem_table()
152 type_name[desc->type] : "<invalid>"; in efi_print_mem_table()
154 desc->type, name, desc->physical_start, in efi_print_mem_table()
155 desc->virtual_start, size); in efi_print_mem_table()
156 if (desc->attribute & EFI_MEMORY_RUNTIME) in efi_print_mem_table()
158 printf("%llx", desc->attribute & ~EFI_MEMORY_RUNTIME); in efi_print_mem_table()
162 if (attr_seen[i] == desc->attribute) in efi_print_mem_table()
166 attr_seen[attr_seen_count++] = desc->attribute; in efi_print_mem_table()
167 addr = desc->physical_start + size; in efi_print_mem_table()
195 struct efi_mem_desc *desc; in do_efi_mem() local
218 desc = efi_build_mem_table(map, size, skip_bs); in do_efi_mem()
219 if (!desc) { in do_efi_mem()
224 efi_print_mem_table(map, desc, skip_bs); in do_efi_mem()
225 free(desc); in do_efi_mem()