Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109709669
D26465.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
D26465.diff
View Options
Index: head/sys/arm64/arm64/pmap.c
===================================================================
--- head/sys/arm64/arm64/pmap.c
+++ head/sys/arm64/arm64/pmap.c
@@ -433,12 +433,15 @@
}
static __inline pd_entry_t *
-pmap_l1_to_l2(pd_entry_t *l1, vm_offset_t va)
+pmap_l1_to_l2(pd_entry_t *l1p, vm_offset_t va)
{
- pd_entry_t *l2;
+ pd_entry_t l1, *l2p;
- l2 = (pd_entry_t *)PHYS_TO_DMAP(pmap_load(l1) & ~ATTR_MASK);
- return (&l2[pmap_l2_index(va)]);
+ l1 = pmap_load(l1p);
+ KASSERT((l1 & ATTR_DESCR_MASK) == L1_TABLE,
+ ("%s: L1 entry %#lx is a leaf", __func__, l1));
+ l2p = (pd_entry_t *)PHYS_TO_DMAP(l1 & ~ATTR_MASK);
+ return (&l2p[pmap_l2_index(va)]);
}
static __inline pd_entry_t *
@@ -454,12 +457,16 @@
}
static __inline pt_entry_t *
-pmap_l2_to_l3(pd_entry_t *l2, vm_offset_t va)
+pmap_l2_to_l3(pd_entry_t *l2p, vm_offset_t va)
{
- pt_entry_t *l3;
+ pd_entry_t l2;
+ pt_entry_t *l3p;
- l3 = (pd_entry_t *)PHYS_TO_DMAP(pmap_load(l2) & ~ATTR_MASK);
- return (&l3[pmap_l3_index(va)]);
+ l2 = pmap_load(l2p);
+ KASSERT((l2 & ATTR_DESCR_MASK) == L2_TABLE,
+ ("%s: L2 entry %#lx is a leaf", __func__, l2));
+ l3p = (pt_entry_t *)PHYS_TO_DMAP(l2 & ~ATTR_MASK);
+ return (&l3p[pmap_l3_index(va)]);
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 9, 2:58 PM (21 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16556264
Default Alt Text
D26465.diff (1 KB)
Attached To
Mode
D26465: Assert we are not traversing through superpages in the arm64 pmap.
Attached
Detach File
Event Timeline
Log In to Comment