summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2021-05-21 16:50:49 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2021-05-21 16:50:49 +0000
commit71e2a8f174fc0fcaf9094cddb94e7eca873d683d (patch)
tree9c5cbc6e559e1154073c8388e0f37a1b46e8be4f /sys
parentf76833f261a3ddad694279973733f11c09dd328c (diff)
reduce diff relative to other arch (arm64 seems most relevant here)
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/riscv64/include/param.h54
-rw-r--r--sys/arch/riscv64/riscv64/locore.S4
2 files changed, 26 insertions, 32 deletions
diff --git a/sys/arch/riscv64/include/param.h b/sys/arch/riscv64/include/param.h
index 693fdb8a8f6..35077612bc5 100644
--- a/sys/arch/riscv64/include/param.h
+++ b/sys/arch/riscv64/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.2 2021/05/12 01:20:52 jsg Exp $ */
+/* $OpenBSD: param.h,v 1.3 2021/05/21 16:50:48 deraadt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -32,8 +32,8 @@
* SUCH DAMAGE.
*/
-#ifndef _MACHINE_PARAM_H_
-#define _MACHINE_PARAM_H_
+#ifndef _MACHINE_PARAM_H_
+#define _MACHINE_PARAM_H_
#ifdef _KERNEL
#ifndef _LOCORE
@@ -41,48 +41,42 @@
#endif
#endif
-#define _MACHINE riscv64
-#define MACHINE "riscv64"
-#define _MACHINE_ARC riscv64
-#define MACHINE_ARCH "riscv64"
-#define MID_MACHINE MID_RISCV64
+#define _MACHINE riscv64
+#define MACHINE "riscv64"
+#define _MACHINE_ARC riscv64
+#define MACHINE_ARCH "riscv64"
+#define MID_MACHINE MID_RISCV64
-#define PAGE_SHIFT 12
-#define PAGE_SIZE (1 << PAGE_SHIFT)
-#define PAGE_MASK (PAGE_SIZE - 1)
+#define PAGE_SHIFT 12
+#define PAGE_SIZE (1 << PAGE_SHIFT)
+#define PAGE_MASK (PAGE_SIZE - 1)
#ifdef _KERNEL
-#define NBPG PAGE_SIZE /* bytes/page */
-#define PGSHIFT PAGE_SHIFT /* LOG2(PAGE_SIZE) */
-#define PGOFSET PAGE_MASK /* byte offset into page */
+#define NBPG PAGE_SIZE /* bytes/page */
+#define PGSHIFT PAGE_SHIFT /* LOG2(PAGE_SIZE) */
+#define PGOFSET PAGE_MASK /* byte offset into page */
-#define UPAGES 5 /* XXX pages of u-area */
-#define USPACE (UPAGES * PAGE_SIZE) /* XXX total size of u-area */
-#define USPACE_ALIGN 0 /* XXX u-area alignment 0-none */
+#define UPAGES 5 /* pages of u-area */
+#define USPACE (UPAGES * PAGE_SIZE) /* total size of u-area */
+#define USPACE_ALIGN 0 /* u-area alignment 0-none */
-#define NMBCLUSTERS (64 * 1024) /* XXX max cluster allocation */
+#define NMBCLUSTERS (64 * 1024) /* max cluster allocation */
-#ifndef MSGBUFSIZE
-#define MSGBUFSIZE (16 * PAGE_SIZE) /* XXX default message buffer size */
-#endif
-
-#ifndef KSTACK_PAGES
-#define KSTACK_PAGES 4 /*pages of kernel stack, with pcb*/
+#ifndef MSGBUFSIZE
+#define MSGBUFSIZE (16 * PAGE_SIZE) /* default message buffer size */
#endif
/*
- * XXX Maximum size of the kernel malloc arena in PAGE_SIZE-sized
+ * Maximum size of the kernel malloc arena in PAGE_SIZE-sized
* logical pages.
*/
-#define NKMEMPAGES_MAX_DEFAULT ((128 * 1024 * 1024) >> PAGE_SHIFT)
+#define NKMEMPAGES_MAX_DEFAULT ((128 * 1024 * 1024) >> PAGE_SHIFT)
-#define STACKALIGNBYTES (16 - 1)
-#define STACKALIGN(p) ((u_long)(p) &~ STACKALIGNBYTES)
+#define STACKALIGNBYTES (16 - 1)
+#define STACKALIGN(p) ((u_long)(p) &~ STACKALIGNBYTES)
-// XXX Advanced Configuration and Power Interface
#define __HAVE_ACPI
-// XXX Flattened Device Tree
#define __HAVE_FDT
#endif /* _KERNEL */
diff --git a/sys/arch/riscv64/riscv64/locore.S b/sys/arch/riscv64/riscv64/locore.S
index d4c78bd65b4..c80766b15d0 100644
--- a/sys/arch/riscv64/riscv64/locore.S
+++ b/sys/arch/riscv64/riscv64/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.6 2021/05/12 01:20:52 jsg Exp $ */
+/* $OpenBSD: locore.S,v 1.7 2021/05/21 16:50:48 deraadt Exp $ */
/*-
* Copyright (c) 2012-2014 Andrew Turner
@@ -287,7 +287,7 @@ va:
.data
.align 4
initstack:
- .space (PAGE_SIZE * KSTACK_PAGES)
+ .space USPACE
initstack_end:
.globl sigfill