Changeset View
Changeset View
Standalone View
Standalone View
sys/riscv/include/vmparam.h
Show First 20 Lines • Show All 174 Lines • ▼ Show 20 Lines | |||||
#define DMAP_TO_PHYS(va) \ | #define DMAP_TO_PHYS(va) \ | ||||
({ \ | ({ \ | ||||
KASSERT(VIRT_IN_DMAP(va), \ | KASSERT(VIRT_IN_DMAP(va), \ | ||||
("%s: VA out of range, VA: 0x%lx", __func__, \ | ("%s: VA out of range, VA: 0x%lx", __func__, \ | ||||
(vm_offset_t)(va))); \ | (vm_offset_t)(va))); \ | ||||
((va) - DMAP_MIN_ADDRESS) + dmap_phys_base; \ | ((va) - DMAP_MIN_ADDRESS) + dmap_phys_base; \ | ||||
}) | }) | ||||
#define VM_MIN_USER_ADDRESS (0x0000000000000000UL) | #define VM_MIN_USER_ADDRESS_SV39 (0x0000000000000000UL) | ||||
#define VM_MAX_USER_ADDRESS (0x0000004000000000UL) | #define VM_MAX_USER_ADDRESS_SV39 (0x0000004000000000UL) | ||||
#define VM_MIN_USER_ADDRESS VM_MIN_USER_ADDRESS_SV39 | |||||
#define VM_MAX_USER_ADDRESS VM_MAX_USER_ADDRESS_SV39 | |||||
jhb: Does it make sense to include the _SV48 constants in this commit? | |||||
#define VM_MINUSER_ADDRESS (VM_MIN_USER_ADDRESS) | #define VM_MINUSER_ADDRESS (VM_MIN_USER_ADDRESS) | ||||
#define VM_MAXUSER_ADDRESS (VM_MAX_USER_ADDRESS) | #define VM_MAXUSER_ADDRESS (VM_MAX_USER_ADDRESS) | ||||
/* Check if an address resides in a mappable region. */ | /* Check if an address resides in a mappable region. */ | ||||
#define VIRT_IS_VALID(va) \ | #define VIRT_IS_VALID(va) \ | ||||
(((va) < VM_MAX_USER_ADDRESS) || ((va) >= VM_MIN_KERNEL_ADDRESS)) | (((va) < VM_MAX_USER_ADDRESS) || ((va) >= VM_MIN_KERNEL_ADDRESS)) | ||||
#define KERNBASE (VM_MIN_KERNEL_ADDRESS) | #define KERNBASE (VM_MIN_KERNEL_ADDRESS) | ||||
#define SHAREDPAGE (VM_MAXUSER_ADDRESS - PAGE_SIZE) | #define SHAREDPAGE_SV39 (VM_MAX_USER_ADDRESS_SV39 - PAGE_SIZE) | ||||
#define USRSTACK SHAREDPAGE | #define SHAREDPAGE SHAREDPAGE_SV39 | ||||
#define USRSTACK SHAREDPAGE_SV39 | |||||
#define PS_STRINGS_SV39 (USRSTACK_SV39 - sizeof(struct ps_strings)) | |||||
#define VM_EARLY_DTB_ADDRESS (VM_MAX_KERNEL_ADDRESS - (2 * L2_SIZE)) | #define VM_EARLY_DTB_ADDRESS (VM_MAX_KERNEL_ADDRESS - (2 * L2_SIZE)) | ||||
/* | /* | ||||
* How many physical pages per kmem arena virtual page. | * How many physical pages per kmem arena virtual page. | ||||
*/ | */ | ||||
#ifndef VM_KMEM_SIZE_SCALE | #ifndef VM_KMEM_SIZE_SCALE | ||||
#define VM_KMEM_SIZE_SCALE (1) | #define VM_KMEM_SIZE_SCALE (1) | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |
Does it make sense to include the _SV48 constants in this commit?