Clippy, formatting
All checks were successful
Continuous Integration / Check (push) Successful in 4m19s
Continuous Integration / Clippy (push) Successful in 1m28s

This commit is contained in:
August 2025-11-04 10:43:57 -05:00
parent 9295b6f3f7
commit b02c34fd1d
Signed by: shibedrill
GPG Key ID: 5FE0CB25945EFAA2
3 changed files with 18 additions and 7 deletions

View File

@ -3,8 +3,12 @@
#![allow(dead_code)] #![allow(dead_code)]
use crate::{format, log_info, memory::HHDM_RESPONSE, LogLevel, LOGGER}; use crate::{LOGGER, LogLevel, format, log_info, memory::HHDM_RESPONSE};
use x86_64::{registers::control::*, structures::paging::{Page, PageTable, PageTableFlags}, PhysAddr, VirtAddr}; use x86_64::{
PhysAddr, VirtAddr,
registers::control::*,
structures::paging::{PageTable, PageTableFlags},
};
pub fn get_mappings() { pub fn get_mappings() {
log_info!("Paging: {}", Cr0::read().contains(Cr0Flags::PAGING)); log_info!("Paging: {}", Cr0::read().contains(Cr0Flags::PAGING));
@ -53,15 +57,23 @@ fn iter_table(table: &'static mut PageTable, level: usize) {
if level == 1 { if level == 1 {
for page_entry in table.iter() { for page_entry in table.iter() {
if page_entry.flags().contains(PageTableFlags::PRESENT) { if page_entry.flags().contains(PageTableFlags::PRESENT) {
log_info!("Page entry: 0x{:x}, flags: {:?}", page_entry.addr(), page_entry.flags()); log_info!(
"Page entry: 0x{:x}, flags: {:?}",
page_entry.addr(),
page_entry.flags()
);
} }
} }
} else { } else {
for table_entry in table.iter() { for table_entry in table.iter() {
if table_entry.flags().contains(PageTableFlags::PRESENT) { if table_entry.flags().contains(PageTableFlags::PRESENT) {
log_info!("Table entry: 0x{:x}, flags: {:?}", table_entry.addr(), table_entry.flags()); log_info!(
"Table entry: 0x{:x}, flags: {:?}",
table_entry.addr(),
table_entry.flags()
);
iter_table(table_from_phys_addr(table_entry.addr()), level - 1); iter_table(table_from_phys_addr(table_entry.addr()), level - 1);
} }
} }
} }
} }

View File

@ -138,7 +138,6 @@ impl SerialPort {
self.write_char(c); self.write_char(c);
} }
} }
} }
pub fn is_transmit_empty(&mut self) -> bool { pub fn is_transmit_empty(&mut self) -> bool {

View File

@ -34,7 +34,7 @@ use lazy_static::lazy_static;
use limine::firmware_type::FirmwareType; use limine::firmware_type::FirmwareType;
use spin::mutex::Mutex; use spin::mutex::Mutex;
use crate::{arch::x86_64::cpuid::{CPUID, virt_supported}, panic::panic}; use crate::arch::x86_64::cpuid::{CPUID, virt_supported};
lazy_static! { lazy_static! {
pub static ref SERIAL_3F8: Mutex<SerialPort> = pub static ref SERIAL_3F8: Mutex<SerialPort> =