From 47dbdd7412091536ed71180982a774d4eb4b3b0d Mon Sep 17 00:00:00 2001 From: mark Date: Fri, 15 May 2020 18:19:42 -0500 Subject: [PATCH] add recursive_idx for boot info --- src/bootinfo/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bootinfo/mod.rs b/src/bootinfo/mod.rs index 16f6c4c1..b1c2b171 100644 --- a/src/bootinfo/mod.rs +++ b/src/bootinfo/mod.rs @@ -85,6 +85,12 @@ impl BootInfo { None } } + + /// Returns the index into the page tables that recursively maps the page tables themselves. + #[cfg(feature = "recursive_page_table")] + pub fn recursive_index(&self) -> u16 { + ((self.recursive_page_table_addr >> 12) & 0x1FF) as u16 + } } /// Information about the thread local storage (TLS) template.