Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/riscv/include Set RISCV_DIRECTMAP_SIZE to 2^64-PAGE...
details: https://anonhg.NetBSD.org/src/rev/18dcecaec297
branches: trunk
changeset: 371802:18dcecaec297
user: simonb <simonb%NetBSD.org@localhost>
date: Wed Oct 12 07:53:15 2022 +0000
description:
Set RISCV_DIRECTMAP_SIZE to 2^64-PAGESIZE, since 2^64 is effectively 0
for a 64bit constant.
Bump VM_PHYSSEG_MAX from 1 to 16.
diffstat:
sys/arch/riscv/include/vmparam.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r 2ec3afcc0c43 -r 18dcecaec297 sys/arch/riscv/include/vmparam.h
--- a/sys/arch/riscv/include/vmparam.h Wed Oct 12 07:50:56 2022 +0000
+++ b/sys/arch/riscv/include/vmparam.h Wed Oct 12 07:53:15 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vmparam.h,v 1.10 2022/09/20 07:18:23 skrll Exp $ */
+/* $NetBSD: vmparam.h,v 1.11 2022/10/12 07:53:15 simonb Exp $ */
/*-
* Copyright (c) 2014, 2020 The NetBSD Foundation, Inc.
@@ -142,10 +142,10 @@
#ifdef _LP64
/*
* Since we have the address space, we map all of physical memory (RAM)
- * using block page table entries.
+ * using gigapages on SV39, terapages on SV48 and petapages on SV57.
*/
#define RISCV_DIRECTMAP_MASK ((vaddr_t) 0xffffffe000000000L)
-#define RISCV_DIRECTMAP_SIZE (-RISCV_DIRECTMAP_MASK) /* 128GiB */
+#define RISCV_DIRECTMAP_SIZE (-RISCV_DIRECTMAP_MASK - PAGE_SIZE) /* 128GiB */
#define RISCV_DIRECTMAP_START RISCV_DIRECTMAP_MASK
#define RISCV_DIRECTMAP_END (RISCV_DIRECTMAP_START + RISCV_DIRECTMAP_SIZE)
#define RISCV_KVA_P(va) (((vaddr_t) (va) & RISCV_DIRECTMAP_MASK) != 0)
@@ -173,7 +173,7 @@
/* VM_PHYSSEG_MAX defined by platform-dependent code. */
#ifndef VM_PHYSSEG_MAX
-#define VM_PHYSSEG_MAX 1
+#define VM_PHYSSEG_MAX 16
#endif
#if VM_PHYSSEG_MAX == 1
#define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST
Home |
Main Index |
Thread Index |
Old Index