Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156696461
D25523.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
994 B
Referenced Files
None
Subscribers
None
D25523.diff
View Options
Index: head/sys/riscv/include/pte.h
===================================================================
--- head/sys/riscv/include/pte.h
+++ head/sys/riscv/include/pte.h
@@ -83,6 +83,9 @@
#define PTE_PROMOTE (PTE_V | PTE_RWX | PTE_D | PTE_A | PTE_G | PTE_U | \
PTE_SW_MANAGED | PTE_SW_WIRED)
+/* Bits 63 - 54 are reserved for future use. */
+#define PTE_HI_MASK 0xFFC0000000000000ULL
+
#define PTE_PPN0_S 10
#define PTE_PPN1_S 19
#define PTE_PPN2_S 28
Index: head/sys/riscv/riscv/pmap.c
===================================================================
--- head/sys/riscv/riscv/pmap.c
+++ head/sys/riscv/riscv/pmap.c
@@ -339,7 +339,8 @@
#define pmap_l2_index(va) (((va) >> L2_SHIFT) & Ln_ADDR_MASK)
#define pmap_l3_index(va) (((va) >> L3_SHIFT) & Ln_ADDR_MASK)
-#define PTE_TO_PHYS(pte) ((pte >> PTE_PPN0_S) * PAGE_SIZE)
+#define PTE_TO_PHYS(pte) \
+ ((((pte) & ~PTE_HI_MASK) >> PTE_PPN0_S) * PAGE_SIZE)
static __inline pd_entry_t *
pmap_l1(pmap_t pmap, vm_offset_t va)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 16, 6:13 PM (19 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33143644
Default Alt Text
D25523.diff (994 B)
Attached To
Mode
D25523: riscv pmap: zero reserved pte bits in ppn
Attached
Detach File
Event Timeline
Log In to Comment