Skip to content

Commit bb7a3e7

Browse files
authoredMay 22, 2020
add recursive_idx for boot info (#116)
1 parent fdc122e commit bb7a3e7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/bootinfo/mod.rs

+6
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ impl BootInfo {
8585
None
8686
}
8787
}
88+
89+
/// Returns the index into the page tables that recursively maps the page tables themselves.
90+
#[cfg(feature = "recursive_page_table")]
91+
pub fn recursive_index(&self) -> u16 {
92+
((self.recursive_page_table_addr >> 12) & 0x1FF) as u16
93+
}
8894
}
8995

9096
/// Information about the thread local storage (TLS) template.

0 commit comments

Comments
 (0)
Please sign in to comment.