Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/amd64/efirt_machdep.c
Show First 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | efi_destroy_1t1_map(void) | ||||
efi_pmltop_page = NULL; | efi_pmltop_page = NULL; | ||||
} | } | ||||
/* | /* | ||||
* Map a physical address from EFI runtime space into KVA space. Returns 0 to | * 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. | * indicate a failed mapping so that the caller may handle error. | ||||
*/ | */ | ||||
vm_offset_t | vm_offset_t | ||||
efi_phys_to_kva(vm_paddr_t paddr) | efi_phys_to_kva(vm_paddr_t paddr, vm_size_t size) | ||||
{ | { | ||||
if (paddr >= dmaplimit) | if (PHYS_IN_DMAP(paddr) && PHYS_SZ_IN_DMAP(paddr, size)) | ||||
return (0); | |||||
return (PHYS_TO_DMAP(paddr)); | return (PHYS_TO_DMAP(paddr)); | ||||
return (0); | |||||
} | } | ||||
static vm_page_t | static vm_page_t | ||||
efi_1t1_page(void) | efi_1t1_page(void) | ||||
{ | { | ||||
return (vm_page_grab(obj_1t1_pt, efi_1t1_idx++, VM_ALLOC_NOBUSY | | return (vm_page_grab(obj_1t1_pt, efi_1t1_idx++, VM_ALLOC_NOBUSY | | ||||
VM_ALLOC_WIRED | VM_ALLOC_ZERO)); | VM_ALLOC_WIRED | VM_ALLOC_ZERO)); | ||||
▲ Show 20 Lines • Show All 264 Lines • Show Last 20 Lines |