Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/include/vmparam.h
Show First 20 Lines • Show All 157 Lines • ▼ Show 20 Lines | |||||
/* 95 TiB maximum for the direct map region */ | /* 95 TiB maximum for the direct map region */ | ||||
#define DMAP_MIN_ADDRESS (0xffffa00000000000UL) | #define DMAP_MIN_ADDRESS (0xffffa00000000000UL) | ||||
#define DMAP_MAX_ADDRESS (0xffffff0000000000UL) | #define DMAP_MAX_ADDRESS (0xffffff0000000000UL) | ||||
#define DMAP_MIN_PHYSADDR (dmap_phys_base) | #define DMAP_MIN_PHYSADDR (dmap_phys_base) | ||||
#define DMAP_MAX_PHYSADDR (dmap_phys_max) | #define DMAP_MAX_PHYSADDR (dmap_phys_max) | ||||
/* True if pa is in the dmap range */ | /* True if pa is in the dmap range, between min and max addresses */ | ||||
#define PHYS_IN_DMAP(pa) ((pa) >= DMAP_MIN_PHYSADDR && \ | #define PHYS_IN_DMAP(pa) ((pa) >= DMAP_MIN_PHYSADDR && \ | ||||
(pa) < DMAP_MAX_PHYSADDR) | (pa) < DMAP_MAX_PHYSADDR) | ||||
/* True if va is in the dmap range */ | /* True if va is in the dmap range */ | ||||
#define VIRT_IN_DMAP(va) ((va) >= DMAP_MIN_ADDRESS && \ | #define VIRT_IN_DMAP(va) ((va) >= DMAP_MIN_ADDRESS && \ | ||||
(va) < (dmap_max_addr)) | (va) < (dmap_max_addr)) | ||||
/* True if pa is strictly in dmap range, taking into account sparseness */ | |||||
#define PHYS_IN_DMAP_STRICT(pa) pmap_phys_in_dmap_strict((pa)) | |||||
#define PMAP_HAS_DMAP 1 | #define PMAP_HAS_DMAP 1 | ||||
#define PHYS_TO_DMAP(pa) \ | #define PHYS_TO_DMAP(pa) \ | ||||
({ \ | ({ \ | ||||
KASSERT(PHYS_IN_DMAP(pa), \ | KASSERT(PHYS_IN_DMAP(pa), \ | ||||
("%s: PA out of range, PA: 0x%lx", __func__, \ | ("%s: PA out of range, PA: 0x%lx", __func__, \ | ||||
(vm_paddr_t)(pa))); \ | (vm_paddr_t)(pa))); \ | ||||
((pa) - dmap_phys_base) + DMAP_MIN_ADDRESS; \ | ((pa) - dmap_phys_base) + DMAP_MIN_ADDRESS; \ | ||||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |