Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F110622667
D26607.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D26607.diff
View Options
Index: head/sys/riscv/riscv/pmap.c
===================================================================
--- head/sys/riscv/riscv/pmap.c
+++ head/sys/riscv/riscv/pmap.c
@@ -342,6 +342,8 @@
#define PTE_TO_PHYS(pte) \
((((pte) & ~PTE_HI_MASK) >> PTE_PPN0_S) * PAGE_SIZE)
+#define L2PTE_TO_PHYS(l2) \
+ ((((l2) & ~PTE_HI_MASK) >> PTE_PPN1_S) << L2_SHIFT)
static __inline pd_entry_t *
pmap_l1(pmap_t pmap, vm_offset_t va)
@@ -477,7 +479,7 @@
("Invalid bootstrap L2 table"));
/* L2 is superpages */
- ret = (l2[l2_slot] >> PTE_PPN1_S) << L2_SHIFT;
+ ret = L2PTE_TO_PHYS(l2[l2_slot]);
ret += (va & L2_OFFSET);
return (ret);
@@ -825,7 +827,7 @@
}
} else {
/* L2 is superpages */
- pa = (l2 >> PTE_PPN1_S) << L2_SHIFT;
+ pa = L2PTE_TO_PHYS(l2);
pa |= (va & L2_OFFSET);
}
}
@@ -877,7 +879,7 @@
panic("pmap_kextract: No l2");
if ((pmap_load(l2) & PTE_RX) != 0) {
/* superpages */
- pa = (pmap_load(l2) >> PTE_PPN1_S) << L2_SHIFT;
+ pa = L2PTE_TO_PHYS(pmap_load(l2));
pa |= (va & L2_OFFSET);
return (pa);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 22, 1:19 AM (3 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16763936
Default Alt Text
D26607.diff (1 KB)
Attached To
Mode
D26607: riscv pmap: zero reserved pte bits in ppn for l2 leaf entries, too
Attached
Detach File
Event Timeline
Log In to Comment