mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-17 23:07:50 +00:00
Use Frame::containing_address
This commit is contained in:
@@ -17,7 +17,7 @@ impl Entry {
|
|||||||
|
|
||||||
pub fn pointed_frame(&self) -> Option<Frame> {
|
pub fn pointed_frame(&self) -> Option<Frame> {
|
||||||
if self.flags().contains(PRESENT) {
|
if self.flags().contains(PRESENT) {
|
||||||
Some(Frame { number: ((self.0 & 0x000fffff_fffff000) >> 12) as usize })
|
Some(Frame::containing_address(self.0 as usize & 0x000fffff_fffff000))
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user