Module Name: src
Committed By: skrll
Date: Sun Nov 1 19:47:46 UTC 2020
Modified Files:
src/sys/arch/riscv/include: pte.h
Log Message:
Comments from zmcgrew@
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/riscv/include/pte.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/riscv/include/pte.h
diff -u src/sys/arch/riscv/include/pte.h:1.4 src/sys/arch/riscv/include/pte.h:1.5
--- src/sys/arch/riscv/include/pte.h:1.4 Sat Mar 14 16:12:16 2020
+++ src/sys/arch/riscv/include/pte.h Sun Nov 1 19:47:46 2020
@@ -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 @@ typedef __uint32_t pd_entry_t;
#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)