From 815c42424889a6881604d33eaa594945b2d33910 Mon Sep 17 00:00:00 2001 From: able Date: Sat, 18 Nov 2023 01:32:09 -0600 Subject: [PATCH] Minor fixes --- README.md | 1 + kernel/src/kmain.rs | 20 +++++++++---------- sysdata/test-programs/hblib/std.rhai | 8 ++++---- .../limine_framebuffer_driver.rhai | 2 +- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 29a8671c..c4776eab 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ An UNIX-unlike micro-kernel written in rust with an embedded bytecode virtual ma # Community [Discord](https://discord.gg/JrKVukDtgs) + # Compiling diff --git a/kernel/src/kmain.rs b/kernel/src/kmain.rs index b90fc5c7..aaf9f8f1 100644 --- a/kernel/src/kmain.rs +++ b/kernel/src/kmain.rs @@ -23,16 +23,16 @@ pub fn kmain(cmdline: &str, boot_modules: BootModules) -> ! { let kcmd = build_cmd("Kernel Command Line", cmdline); trace!("Cmdline: {kcmd:?}"); - for (i, bm) in boot_modules.iter().enumerate() { - let name = format!("module-{}", i); - let _bmcmd: XMLElement; - if bm.cmd.len() >= 2 { - // TODO: pass into the program - // Pass CMDLine into an IPCBuffer and put the ptr to the IPCBuffer in r200 - _bmcmd = build_cmd(name, bm.cmd.clone()); - log::info!("{:?}", _bmcmd); - } - } + // for (i, bm) in boot_modules.iter().enumerate() { + // let name = format!("module-{}", i); + // let _bmcmd: XMLElement; + // if bm.cmd.len() >= 2 { + // // TODO: pass into the program + // // Pass CMDLine into an IPCBuffer and put the ptr to the IPCBuffer in r200 + // _bmcmd = build_cmd(name, bm.cmd.clone()); + // log::info!("{:?}", _bmcmd); + // } + // } let dt = DEVICE_TREE.lock(); diff --git a/sysdata/test-programs/hblib/std.rhai b/sysdata/test-programs/hblib/std.rhai index a1f286c3..9cf04113 100644 --- a/sysdata/test-programs/hblib/std.rhai +++ b/sysdata/test-programs/hblib/std.rhai @@ -1,6 +1,6 @@ fn ipc_send(buffer_id, mem_addr, length){ // set the ecall - li8(r1, 3); + li64(r1, 3); // Set the buffer ID to be the BufferID li64(r2, buffer_id); lra(r3, r0, mem_addr); @@ -12,14 +12,14 @@ fn ipc_send(buffer_id, mem_addr, length){ fn ipc_recv(buffer_id){ - li8(r1, 4); + li64(r1, 4); eca(); } fn ipc_make_bound_buffer(length) { - li8(r1, 1); - li8(r2, 1); + li64(r1, 1); + li64(r2, 1); li64(r3, length); eca(); diff --git a/sysdata/test-programs/limine_framebuffer_driver.rhai b/sysdata/test-programs/limine_framebuffer_driver.rhai index d005cbcb..9d7e233e 100644 --- a/sysdata/test-programs/limine_framebuffer_driver.rhai +++ b/sysdata/test-programs/limine_framebuffer_driver.rhai @@ -74,7 +74,7 @@ fn clear() { // Define main fn main(){ std::Info("Starting the limine framebuffer driver."); - +// un(); li64(r100, 300); li64(r101, 300); li64(r102, 1);