Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/arm64/efirt_machdep.c
Show First 20 Lines • Show All 137 Lines • ▼ Show 20 Lines | efi_1t1_l3(vm_offset_t va) | ||||
l3 += pmap_l3_index(va); | l3 += pmap_l3_index(va); | ||||
KASSERT(*l3 == 0, ("%s: Already mapped: va %#jx *pt %#jx", __func__, | KASSERT(*l3 == 0, ("%s: Already mapped: va %#jx *pt %#jx", __func__, | ||||
va, *l3)); | va, *l3)); | ||||
return (l3); | return (l3); | ||||
} | } | ||||
/* | /* | ||||
* Map a physical address from EFI runtime space into KVA space. Returns 0 to | |||||
* indicate a failed mapping so that the caller may handle error. | |||||
*/ | |||||
vm_offset_t | |||||
efi_phys_to_kva(vm_paddr_t paddr) | |||||
{ | |||||
if (!PHYS_IN_DMAP(paddr)) | |||||
return (0); | |||||
return (PHYS_TO_DMAP(paddr)); | |||||
} | |||||
/* | |||||
* Create the 1:1 virtual to physical map for EFI | * Create the 1:1 virtual to physical map for EFI | ||||
*/ | */ | ||||
bool | bool | ||||
efi_create_1t1_map(struct efi_md *map, int ndesc, int descsz) | efi_create_1t1_map(struct efi_md *map, int ndesc, int descsz) | ||||
{ | { | ||||
struct efi_md *p; | struct efi_md *p; | ||||
pt_entry_t *l3; | pt_entry_t *l3; | ||||
vm_offset_t va; | vm_offset_t va; | ||||
▲ Show 20 Lines • Show All 99 Lines • Show Last 20 Lines |