Skip to content

Commit

Permalink
expose Cr3::write_raw
Browse files Browse the repository at this point in the history
We already expose `Cr3::read_raw`, so we might as well expose the write
variant.
  • Loading branch information
Freax13 committed Jan 14, 2024
1 parent 22066fa commit c3eaa09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/registers/control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ mod x86_64 {
/// Changing the level 4 page table is unsafe, because it's possible to violate memory safety by
/// changing the page mapping.
#[inline]
unsafe fn write_raw(frame: PhysFrame, val: u16) {
pub unsafe fn write_raw(frame: PhysFrame, val: u16) {
let addr = frame.start_address();
let value = addr.as_u64() | val as u64;

Expand Down

0 comments on commit c3eaa09

Please sign in to comment.