summaryrefslogtreecommitdiff
path: root/kernel/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/src/lib.rs')
-rw-r--r--kernel/src/lib.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/kernel/src/lib.rs b/kernel/src/lib.rs
new file mode 100644
index 0000000..bd5a19f
--- /dev/null
+++ b/kernel/src/lib.rs
@@ -0,0 +1,16 @@
+#![no_std]
+
+mod panic;
+
+/// The entrypoint to the kernel. This should be executed by hart0 alone. It performs some early
+/// boot tasks, then wakes up any other harts.
+#[no_mangle]
+pub extern "C" fn hart0_boot() {
+ for byte in "Hello, world!\n".bytes() {
+ unsafe {
+ core::ptr::write_volatile(0x10000000 as *mut u8, byte);
+ }
+ }
+
+ todo!()
+}