/* Check if the table is already installed */
unaccepted_table = get_efi_config_table(unaccepted_table_guid); if (unaccepted_table) { if (unaccepted_table->version != 1) {
efi_err("Unknown version of unaccepted memory table\n"); return EFI_UNSUPPORTED;
} return EFI_SUCCESS;
}
/* Check if there's any unaccepted memory and find the max address */ for (i = 0; i < nr_desc; i++) {
efi_memory_desc_t *d; unsignedlong m = (unsignedlong)map->map;
d = efi_memdesc_ptr(m, map->desc_size, i); if (d->type != EFI_UNACCEPTED_MEMORY) continue;
/* Immediately accept a <unit_size piece at the start: */ if (start & unit_mask) {
arch_accept_memory(start, round_up(start, unit_size));
start = round_up(start, unit_size);
}
/* Immediately accept a <unit_size piece at the end: */ if (end & unit_mask) {
arch_accept_memory(round_down(end, unit_size), end);
end = round_down(end, unit_size);
}
/* *Onlycareforthepartoftherangethatisrepresented *inthebitmap.
*/ if (start < unaccepted_table->phys_base)
start = unaccepted_table->phys_base; if (end < unaccepted_table->phys_base) return;
/* Translate to offsets from the beginning of the bitmap */
start -= unaccepted_table->phys_base;
end -= unaccepted_table->phys_base;
/* Make sure not to overrun the bitmap */ if (end > unaccepted_table->size * unit_size * BITS_PER_BYTE)
end = unaccepted_table->size * unit_size * BITS_PER_BYTE;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.