Return a `VirtAddr` from `Entry::handler_addr()`.
@@ -735,12 +735,13 @@ impl<F> Entry<F> {
&mut self.options
}
- /// Returns the virtual address of this IDT entry's handler function as a `u64`.
+ /// Returns the virtual address of this IDT entry's handler function.
#[inline]
- pub fn handler_addr(&self) -> u64 {
- self.pointer_low as u64
+ pub fn handler_addr(&self) -> VirtAddr {
+ let addr = self.pointer_low as u64
| (self.pointer_middle as u64) << 16
- | (self.pointer_high as u64) << 32
+ | (self.pointer_high as u64) << 32;
+ VirtAddr::new_truncate(addr)
}
}
