Commit 3f5258ad authored by 啊队队队's avatar 啊队队队
Browse files

fix log error, clear bss

parent 5769a49f
No related merge requests found
Showing with 18 additions and 3 deletions
+18 -3
No preview for this file type
......@@ -17,12 +17,27 @@ use hal;
use kalloc;
use panic_handler as _;
fn clear_bss() {
extern "C" {
fn sbss();
fn ebss();
}
unsafe {
core::slice::from_raw_parts_mut(sbss as usize as *mut u8, ebss as usize - sbss as usize)
.fill(0);
}
}
#[no_mangle]
fn main(hart_id: usize, device_tree: usize) {
if hart_id != 0 {
loop {}
}
clear_bss();
let str = include_str!("banner.txt");
println!("{}", str);
......@@ -48,7 +63,7 @@ fn main(hart_id: usize, device_tree: usize) {
devices::prepare_devices();
// initialize filesystem
fs::init();
// fs::init();
// init kernel threads and async executor
tasks::init();
......
......@@ -227,10 +227,10 @@ pub async fn initproc() {
// command("busybox sh").await;
// command("busybox sh busybox_testcode.sh").await;
run_libc_test().await;
// run_libc_test().await;
// run_all().await;
// simple_shell().await;
simple_shell().await;
// command("helloworld").await;
// command("filelist").await;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment