Skip to content

Commit 753388d

Browse files
committed
fix(msr): properly mask APIC_BASE
1 parent 7a97e48 commit 753388d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/registers/model_specific.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ mod x86_64 {
773773
pub fn read_raw() -> (PhysFrame, u64) {
774774
let raw = unsafe { Self::MSR.read() };
775775
// extract bits 32 - 51 (incl.)
776-
let addr = PhysAddr::new((raw >> 32) & 0xFFFFF);
776+
let addr = PhysAddr::new(raw & 0x_000F_FFFF_FFFF_F000);
777777
let frame = PhysFrame::containing_address(addr);
778778
(frame, raw)
779779
}

0 commit comments

Comments
 (0)