mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Add a RecursivePageTable::new function
This commit is contained in:
@@ -71,6 +71,13 @@ pub struct RecursivePageTable {
|
||||
}
|
||||
|
||||
impl RecursivePageTable {
|
||||
pub unsafe fn new() -> RecursivePageTable {
|
||||
use self::table::P4;
|
||||
RecursivePageTable {
|
||||
p4: Unique::new(P4),
|
||||
}
|
||||
}
|
||||
|
||||
fn p4(&self) -> &Table<Level4> {
|
||||
unsafe { self.p4.get() }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user