Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F111631564
D36395.id109987.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1007 B
Referenced Files
None
Subscribers
None
D36395.id109987.diff
View Options
diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c
--- a/sys/riscv/riscv/pmap.c
+++ b/sys/riscv/riscv/pmap.c
@@ -903,27 +903,25 @@
pmap_extract(pmap_t pmap, vm_offset_t va)
{
pd_entry_t *l2p, l2;
- pt_entry_t *l3p, l3;
+ pt_entry_t *l3p;
vm_paddr_t pa;
pa = 0;
- PMAP_LOCK(pmap);
+
/*
- * Start with the l2 tabel. We are unable to allocate
- * pages in the l1 table.
+ * Start with an L2 lookup, L1 superpages are currently not implemented.
*/
+ PMAP_LOCK(pmap);
l2p = pmap_l2(pmap, va);
- if (l2p != NULL) {
- l2 = pmap_load(l2p);
- if ((l2 & PTE_RX) == 0) {
+ if (l2p != NULL && ((l2 = (pmap_load(l2p))) & PTE_V) != 0) {
+ if ((l2 & PTE_RWX) == 0) {
l3p = pmap_l2_to_l3(l2p, va);
if (l3p != NULL) {
- l3 = pmap_load(l3p);
- pa = PTE_TO_PHYS(l3);
+ pa = PTE_TO_PHYS(pmap_load(l3p));
pa |= (va & L3_OFFSET);
}
} else {
- /* L2 is superpages */
+ /* L2 is a superpage mapping. */
pa = L2PTE_TO_PHYS(l2);
pa |= (va & L2_OFFSET);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 7, 6:46 AM (18 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17026882
Default Alt Text
D36395.id109987.diff (1007 B)
Attached To
Mode
D36395: riscv: Handle invalid L2 entries in pmap_extract()
Attached
Detach File
Event Timeline
Log In to Comment