// SPDX-License-Identifier: GPL-2.0 /* * Extensible Firmware Interface * * Copyright (C) 2020 Western Digital Corporation or its affiliates. * * Based on Extensible Firmware Interface Specification version 2.4 * Adapted from drivers/firmware/efi/arm-runtime.c *
*/
for_each_efi_memory_desc(md) {
phys_addr_t phys = md->phys_addr; int ret;
if (!(md->attribute & EFI_MEMORY_RUNTIME)) continue; if (md->virt_addr == U64_MAX) returnfalse;
ret = efi_create_mapping(&efi_mm, md); if (ret) {
pr_warn(" EFI remap %pa: failed to create mapping (%d)\n",
&phys, ret); returnfalse;
}
}
if (efi_memattr_apply_permissions(&efi_mm, efi_set_mapping_permissions)) returnfalse;
returntrue;
}
/* * Enable the UEFI Runtime Services if all prerequisites are in place, i.e., * non-early mapping of the UEFI system table and virtual mappings for all * EFI_MEMORY_RUNTIME regions.
*/ staticint __init riscv_enable_runtime_services(void)
{
u64 mapsize;
if (!efi_enabled(EFI_BOOT)) {
pr_info("EFI services will not be available.\n"); return 0;
}
staticint __init riscv_dmi_init(void)
{ /* * On riscv, DMI depends on UEFI, and dmi_setup() needs to * be called early because dmi_id_init(), which is an arch_initcall * itself, depends on dmi_scan_machine() having been called already.
*/
dmi_setup();
return 0;
}
core_initcall(riscv_dmi_init);
Messung V0.5
¤ Dauer der Verarbeitung: 0.0 Sekunden
(vorverarbeitet)
¤
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.