pub fn clear_bss()
Expand description
clear BSS segment
+#[no_mangle]
+rust_main in os - Rust
\ No newline at end of file
diff --git a/ch1/os/index.html b/ch1/os/index.html
index 60411ba3..9f0133a0 100644
--- a/ch1/os/index.html
+++ b/ch1/os/index.html
@@ -1,4 +1,4 @@
-os - Rust Expand description
The main module and entrypoint
+os - Rust Expand description
The main module and entrypoint
The operating system and app also starts in this module. Kernel code starts
executing from entry.asm
, after which rust_main()
is called to
initialize various pieces of functionality clear_bss()
. (See its source code for
diff --git a/ch1/os/sbi/fn.shutdown.html b/ch1/os/sbi/fn.shutdown.html
index 6cb4bab2..aab6e6a9 100644
--- a/ch1/os/sbi/fn.shutdown.html
+++ b/ch1/os/sbi/fn.shutdown.html
@@ -1,2 +1,2 @@
-
shutdown in os::sbi - Rust pub fn shutdown() -> !
Expand description
use sbi call to shutdown the kernel
+shutdown in os::sbi - Rust
\ No newline at end of file
diff --git a/ch1/os/sbi/index.html b/ch1/os/sbi/index.html
index f1a123e5..630e059f 100644
--- a/ch1/os/sbi/index.html
+++ b/ch1/os/sbi/index.html
@@ -1,4 +1,4 @@
-os::sbi - Rust Constants
Functions
use sbi call to getchar from console (qemu uart handler)
+os::sbi - Rust
\ No newline at end of file
diff --git a/ch1/src/os/main.rs.html b/ch1/src/os/main.rs.html
index c92c7057..c5d9ee74 100644
--- a/ch1/src/os/main.rs.html
+++ b/ch1/src/os/main.rs.html
@@ -65,12 +65,6 @@
65
66
67
-68
-69
-70
-71
-72
-73
//! The main module and entrypoint
//!
//! The operating system and app also starts in this module. Kernel code starts
@@ -93,7 +87,6 @@
mod lang_items;
mod sbi;
-#[cfg(feature = "board_qemu")]
#[path = "boards/qemu.rs"]
mod board;
@@ -134,15 +127,10 @@
);
println!(".bss [{:#x}, {:#x})", sbss as usize, ebss as usize);
- #[cfg(feature = "board_qemu")]
use crate::board::QEMUExit;
-
- #[cfg(feature = "board_qemu")]
crate::board::QEMU_EXIT_HANDLE.exit_success(); // CI autotest success
//crate::board::QEMU_EXIT_HANDLE.exit_failure(); // CI autoest failed
- #[cfg(feature = "board_k210")]
- panic!("Unreachable in rust_main!");
}
\ No newline at end of file
diff --git a/ch1/src/os/sbi.rs.html b/ch1/src/os/sbi.rs.html
index 61df7961..7db808f3 100644
--- a/ch1/src/os/sbi.rs.html
+++ b/ch1/src/os/sbi.rs.html
@@ -45,11 +45,6 @@
45
46
47
-48
-49
-50
-51
-52
#![allow(unused)]
use core::arch::asm;
@@ -90,14 +85,9 @@
sbi_call(SBI_CONSOLE_GETCHAR, 0, 0, 0)
}
-#[cfg(feature = "board_qemu")]
use crate::board::QEMUExit;
/// use sbi call to shutdown the kernel
pub fn shutdown() -> ! {
- #[cfg(feature = "board_k210")]
- sbi_call(SBI_SHUTDOWN, 0, 0, 0);
-
- #[cfg(feature = "board_qemu")]
crate::board::QEMU_EXIT_HANDLE.exit_failure();
panic!("It should shutdown!");