Ran cargo fmt, clippy fixes, suppressed some warns
I will start working on stack traces tonight and tomorrow. We need to be able to 'unwind' by finding calling functions.
This commit is contained in:
+11
-10
@@ -12,17 +12,14 @@
|
||||
)]
|
||||
|
||||
extern crate alloc;
|
||||
use crate::{
|
||||
arch::x86_64::memory::init_page_table,
|
||||
prelude::*,
|
||||
};
|
||||
use crate::arch::x86_64::cpu::apic::enable_apic;
|
||||
use crate::{arch::x86_64::memory::init_page_table, prelude::*};
|
||||
use arch::x86_64::memory::allocation::heap_alloc::init_heap;
|
||||
use arch::x86_64::memory::allocation::page_alloc::FoundryOSFrameAllocator;
|
||||
use arch::x86_64::memory::mapping;
|
||||
use core::arch::asm;
|
||||
use limine::BaseRevision;
|
||||
use x86_64::VirtAddr;
|
||||
use arch::x86_64::memory::allocation::page_alloc::FoundryOSFrameAllocator;
|
||||
use crate::arch::x86_64::cpu::apic::enable_apic;
|
||||
|
||||
pub mod arch;
|
||||
pub mod resources;
|
||||
@@ -33,15 +30,18 @@ pub mod util;
|
||||
pub mod prelude {
|
||||
pub use crate::std::io::{_print, _print_log, _serial_write};
|
||||
pub use crate::{
|
||||
print, print_log, printerr, println, println_log, printlnerr, serial_print, serial_println,
|
||||
print, print_log, printerr, println, println_log, printlnerr,
|
||||
serial_print, serial_println,
|
||||
};
|
||||
}
|
||||
|
||||
/// Sets the base revision to the latest revision supported by the crate.
|
||||
/// See specification for further info.
|
||||
/// Be sure to mark all limine requests with #[used], otherwise they may be removed by the compiler.
|
||||
/// Be sure to mark all limine requests with #[used], otherwise they may be
|
||||
/// removed by the compiler.
|
||||
#[used]
|
||||
// The .requests section allows limine to find the requests faster and more safely.
|
||||
// The .requests section allows limine to find the requests faster and more
|
||||
// safely.
|
||||
#[unsafe(link_section = ".requests")]
|
||||
static BASE_REVISION: BaseRevision = BaseRevision::new();
|
||||
|
||||
@@ -86,7 +86,8 @@ pub fn boot() -> Result<(), &'static str> {
|
||||
println_log!("[Success]");
|
||||
|
||||
print_log!(" Initialising Memory Subsystem... ");
|
||||
let physical_memory_offset = VirtAddr::new(*mapping::PHYSICAL_MEMORY_OFFSET);
|
||||
let physical_memory_offset =
|
||||
VirtAddr::new(*mapping::PHYSICAL_MEMORY_OFFSET);
|
||||
init_page_table(physical_memory_offset);
|
||||
println_log!("[Success]");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user