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 Comments from zmcgrew@



details:   https://anonhg.NetBSD.org/src/rev/c4fce559680b
branches:  trunk
changeset: 945587:c4fce559680b
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Nov 01 19:47:46 2020 +0000

description:
Comments from zmcgrew@

diffstat:

 sys/arch/riscv/include/pte.h |  19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diffs (33 lines):

diff -r 68b0c22667a3 -r c4fce559680b sys/arch/riscv/include/pte.h
--- a/sys/arch/riscv/include/pte.h      Sun Nov 01 19:25:23 2020 +0000
+++ b/sys/arch/riscv/include/pte.h      Sun Nov 01 19:47:46 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pte.h,v 1.4 2020/03/14 16:12:16 skrll Exp $ */
+/* $NetBSD: pte.h,v 1.5 2020/11/01 19:47:46 skrll Exp $ */
 
 /*
  * Copyright (c) 2014, 2019 The NetBSD Foundation, Inc.
@@ -59,14 +59,15 @@
 #define        PTE_WIRED       __BIT(8)
 
 /* Hardware PTE bits. */
-#define        PTE_D           __BIT(7)
-#define        PTE_A           __BIT(6)
-#define        PTE_G           __BIT(5)
-#define        PTE_U           __BIT(4)
-#define        PTE_X           __BIT(3)
-#define        PTE_W           __BIT(2)
-#define        PTE_R           __BIT(1)
-#define        PTE_V           __BIT(0)
+// These are hardware defined bits
+#define        PTE_D           __BIT(7)        // Dirty
+#define        PTE_A           __BIT(6)        // Accessed
+#define        PTE_G           __BIT(5)        // Global
+#define        PTE_U           __BIT(4)        // User
+#define        PTE_X           __BIT(3)        // eXecute
+#define        PTE_W           __BIT(2)        // Write
+#define        PTE_R           __BIT(1)        // Read
+#define        PTE_V           __BIT(0)        // Valid
 
 #define PA_TO_PTE(pa)  (((pa) >> PAGE_SHIFT) << PTE_PPN_SHIFT)
 #define PTE_TO_PA(pte) (((pte) >> PTE_PPN_SHIFT) << PAGE_SHIFT)



Home | Main Index | Thread Index | Old Index