Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151272564
D18321.id54754.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
965 B
Referenced Files
None
Subscribers
None
D18321.id54754.diff
View Options
Index: head/sys/riscv/riscv/pmap.c
===================================================================
--- head/sys/riscv/riscv/pmap.c
+++ head/sys/riscv/riscv/pmap.c
@@ -4438,3 +4438,40 @@
return (mode >= VM_MEMATTR_DEVICE && mode <= VM_MEMATTR_WRITE_BACK);
}
+
+bool
+pmap_get_tables(pmap_t pmap, vm_offset_t va, pd_entry_t **l1, pd_entry_t **l2,
+ pt_entry_t **l3)
+{
+ pd_entry_t *l1p, *l2p;
+
+ /* Get l1 directory entry. */
+ l1p = pmap_l1(pmap, va);
+ *l1 = l1p;
+
+ if (l1p == NULL || (pmap_load(l1p) & PTE_V) == 0)
+ return (false);
+
+ if ((pmap_load(l1p) & PTE_RX) != 0) {
+ *l2 = NULL;
+ *l3 = NULL;
+ return (true);
+ }
+
+ /* Get l2 directory entry. */
+ l2p = pmap_l1_to_l2(l1p, va);
+ *l2 = l2p;
+
+ if (l2p == NULL || (pmap_load(l2p) & PTE_V) == 0)
+ return (false);
+
+ if ((pmap_load(l2p) & PTE_RX) != 0) {
+ *l3 = NULL;
+ return (true);
+ }
+
+ /* Get l3 page table entry. */
+ *l3 = pmap_l2_to_l3(l2p, va);
+
+ return (true);
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 8, 6:10 AM (9 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31066880
Default Alt Text
D18321.id54754.diff (965 B)
Attached To
Mode
D18321: RISC-V: Add definition for pmap_get_tables()
Attached
Detach File
Event Timeline
Log In to Comment