Skip to content

Commit

Permalink
remove clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
stlankes committed Nov 10, 2024
1 parent 6f419db commit 2d3cf7e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/arch/x86/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ pub(crate) fn cpu_init() {
let mut cr0 = unsafe { cr0() };

// be sure that AM, NE and MP is enabled
cr0 = cr0 | Cr0::CR0_ALIGNMENT_MASK;
cr0 = cr0 | Cr0::CR0_NUMERIC_ERROR;
cr0 = cr0 | Cr0::CR0_MONITOR_COPROCESSOR;
cr0 |= Cr0::CR0_ALIGNMENT_MASK;
cr0 |= Cr0::CR0_NUMERIC_ERROR;
cr0 |= Cr0::CR0_MONITOR_COPROCESSOR;
// enable cache
cr0 = cr0 & !(Cr0::CR0_CACHE_DISABLE | Cr0::CR0_NOT_WRITE_THROUGH);
cr0 &= !(Cr0::CR0_CACHE_DISABLE | Cr0::CR0_NOT_WRITE_THROUGH);

unsafe { cr0_write(cr0) };
}
4 changes: 4 additions & 0 deletions src/arch/x86/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ extern "C" {

#[cfg(not(test))]
#[no_mangle]
/// # Safety
///
/// This function is the entry point of the kernel.
/// The kernel itself should not call this function.
pub unsafe extern "C" fn _start() -> ! {
let ret = main();
// shutdown system
Expand Down

0 comments on commit 2d3cf7e

Please sign in to comment.