mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Merge branch 'post-08' into post-09
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
name = "blog_os"
|
name = "blog_os"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Philipp Oppermann <dev@phil-opp.com>"]
|
authors = ["Philipp Oppermann <dev@phil-opp.com>"]
|
||||||
edition = "2018"
|
edition = "2024"
|
||||||
|
|
||||||
[[test]]
|
[[test]]
|
||||||
name = "should_panic"
|
name = "should_panic"
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ pub fn hlt_loop() -> ! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
use bootloader::{entry_point, BootInfo};
|
use bootloader::{BootInfo, entry_point};
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
entry_point!(test_kernel_main);
|
entry_point!(test_kernel_main);
|
||||||
|
|||||||
@@ -5,14 +5,14 @@
|
|||||||
#![reexport_test_harness_main = "test_main"]
|
#![reexport_test_harness_main = "test_main"]
|
||||||
|
|
||||||
use blog_os::println;
|
use blog_os::println;
|
||||||
use bootloader::{entry_point, BootInfo};
|
use bootloader::{BootInfo, entry_point};
|
||||||
use core::panic::PanicInfo;
|
use core::panic::PanicInfo;
|
||||||
|
|
||||||
entry_point!(kernel_main);
|
entry_point!(kernel_main);
|
||||||
|
|
||||||
fn kernel_main(boot_info: &'static BootInfo) -> ! {
|
fn kernel_main(boot_info: &'static BootInfo) -> ! {
|
||||||
use blog_os::memory::{self, BootInfoFrameAllocator};
|
use blog_os::memory::{self, BootInfoFrameAllocator};
|
||||||
use x86_64::{structures::paging::Page, VirtAddr};
|
use x86_64::{VirtAddr, structures::paging::Page};
|
||||||
|
|
||||||
println!("Hello World{}", "!");
|
println!("Hello World{}", "!");
|
||||||
blog_os::init();
|
blog_os::init();
|
||||||
|
|||||||
Reference in New Issue
Block a user