summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2023-11-28 09:10:19 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2023-11-28 09:10:19 +0000
commit9de013c199f4642beb0ec1d87e1ef59563554915 (patch)
treed3fbcef0a00365c5e344be5a147c2c69936148d7 /sys/arch
parentc8746a53ec305dc12918abefa3f7e2281002dc1b (diff)
remove more unused defines
ok kettenis@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/riscv64/include/vmparam.h19
-rw-r--r--sys/arch/riscv64/riscv64/pmap.c8
-rw-r--r--sys/arch/riscv64/riscv64/trap.c4
3 files changed, 8 insertions, 23 deletions
diff --git a/sys/arch/riscv64/include/vmparam.h b/sys/arch/riscv64/include/vmparam.h
index e46d40dc06b..3b60679710d 100644
--- a/sys/arch/riscv64/include/vmparam.h
+++ b/sys/arch/riscv64/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmparam.h,v 1.8 2023/11/24 07:18:49 miod Exp $ */
+/* $OpenBSD: vmparam.h,v 1.9 2023/11/28 09:10:18 jsg Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -108,7 +108,7 @@
* VM_MIN_KERNEL_ADDRESS and VM_MAX_KERNEL_ADDRESS define the start and end of
* mappable kernel virtual address space.
*
- * VM_MIN_USER_ADDRESS and VM_MAX_USER_ADDRESS define the start and end of the
+ * VM_MIN_ADDRESS and VM_MAXUSER_ADDRESS define the start and end of the
* user address space.
*/
#define VM_MIN_ADDRESS ((vaddr_t)PAGE_SIZE)
@@ -117,25 +117,19 @@
#define VM_MIN_KERNEL_ADDRESS (0xffffffc000000000UL)
#define VM_MAX_KERNEL_ADDRESS (0xffffffc800000000UL)
-// Kernel L1 Page Table Range
+/* Kernel L1 Page Table Range */
#define L1_KERN_BASE (256)
#define L1_KERN_ENTRIES (288 - L1_KERN_BASE)
#define DMAP_MIN_ADDRESS (0xffffffd000000000UL)
#define DMAP_MAX_ADDRESS (0xfffffff000000000UL)
-// DMAP L1 Page Table Range
+/* DMAP L1 Page Table Range */
#define L1_DMAP_BASE (320)
#define L1_DMAP_ENTRIES (448 - L1_DMAP_BASE)
-#define DMAP_MIN_PHYSADDR (dmap_phys_base)
-#define DMAP_MAX_PHYSADDR (dmap_phys_max)
+#define VM_MAXUSER_ADDRESS (0x0000004000000000UL) /* 39 bits */
-#define VM_MIN_USER_ADDRESS (0x0000000000000000UL)
-#define VM_MAX_USER_ADDRESS (0x0000004000000000UL) // 39 User Space Bits
-
-#define VM_MINUSER_ADDRESS (VM_MIN_USER_ADDRESS)
-#define VM_MAXUSER_ADDRESS (VM_MAX_USER_ADDRESS)
#ifdef _KERNEL
#define VM_MIN_STACK_ADDRESS (VM_MAXUSER_ADDRESS * 3 / 4)
#endif
@@ -144,9 +138,6 @@
#ifndef _LOCORE
extern paddr_t dmap_phys_base;
-extern paddr_t dmap_phys_max;
-extern vaddr_t dmap_virt_max;
-extern vaddr_t vm_max_kernel_address;
#endif
/* virtual sizes (bytes) for various kernel submaps */
diff --git a/sys/arch/riscv64/riscv64/pmap.c b/sys/arch/riscv64/riscv64/pmap.c
index 3d5d7e2c3a6..30db5d9b76b 100644
--- a/sys/arch/riscv64/riscv64/pmap.c
+++ b/sys/arch/riscv64/riscv64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.35 2023/09/24 18:49:29 jca Exp $ */
+/* $OpenBSD: pmap.c,v 1.36 2023/11/28 09:10:18 jsg Exp $ */
/*
* Copyright (c) 2019-2020 Brian Bamsch <bbamsch@google.com>
@@ -1155,8 +1155,6 @@ extern char __text_start[], _etext[];
extern char __rodata_start[], _erodata[];
paddr_t dmap_phys_base;
-paddr_t dmap_phys_max;
-vaddr_t dmap_virt_max;
void
pmap_bootstrap_dmap(vaddr_t kern_l1, paddr_t min_pa, paddr_t max_pa)
@@ -1184,10 +1182,6 @@ pmap_bootstrap_dmap(vaddr_t kern_l1, paddr_t min_pa, paddr_t max_pa)
atomic_store_64(&l1[l1_slot], entry);
}
- /* set the upper limit of the dmap region */
- dmap_phys_max = pa;
- dmap_virt_max = va;
-
sfence_vma();
}
diff --git a/sys/arch/riscv64/riscv64/trap.c b/sys/arch/riscv64/riscv64/trap.c
index 91ace56c274..a8c45bf477a 100644
--- a/sys/arch/riscv64/riscv64/trap.c
+++ b/sys/arch/riscv64/riscv64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.18 2022/03/23 23:48:30 jca Exp $ */
+/* $OpenBSD: trap.c,v 1.19 2023/11/28 09:10:18 jsg Exp $ */
/*
* Copyright (c) 2020 Shivam Waghela <shivamwaghela@gmail.com>
@@ -251,7 +251,7 @@ kdata_abort(struct trapframe *frame)
va = trunc_page(stval);
- if (stval >= VM_MAX_USER_ADDRESS)
+ if (stval >= VM_MAXUSER_ADDRESS)
map = kernel_map;
else {
map = &p->p_vmspace->vm_map;