Minor fixes

pull/12/head
able 2023-11-18 01:32:09 -06:00
parent 9e213d8549
commit 5737dcf2b5
4 changed files with 16 additions and 15 deletions

View File

@ -3,6 +3,7 @@ An UNIX-unlike micro-kernel written in rust with an embedded bytecode virtual ma
# Community # Community
[Discord](https://discord.gg/JrKVukDtgs) [Discord](https://discord.gg/JrKVukDtgs)
<img src="https://img.shields.io/liberapay/patrons/AbleTheAbove.svg?logo=liberapay"> <img src="https://img.shields.io/liberapay/patrons/AbleTheAbove.svg?logo=liberapay">
# Compiling # Compiling

View File

@ -23,16 +23,16 @@ pub fn kmain(cmdline: &str, boot_modules: BootModules) -> ! {
let kcmd = build_cmd("Kernel Command Line", cmdline); let kcmd = build_cmd("Kernel Command Line", cmdline);
trace!("Cmdline: {kcmd:?}"); trace!("Cmdline: {kcmd:?}");
for (i, bm) in boot_modules.iter().enumerate() { // for (i, bm) in boot_modules.iter().enumerate() {
let name = format!("module-{}", i); // let name = format!("module-{}", i);
let _bmcmd: XMLElement; // let _bmcmd: XMLElement;
if bm.cmd.len() >= 2 { // if bm.cmd.len() >= 2 {
// TODO: pass into the program // // TODO: pass into the program
// Pass CMDLine into an IPCBuffer and put the ptr to the IPCBuffer in r200 // // Pass CMDLine into an IPCBuffer and put the ptr to the IPCBuffer in r200
_bmcmd = build_cmd(name, bm.cmd.clone()); // _bmcmd = build_cmd(name, bm.cmd.clone());
log::info!("{:?}", _bmcmd); // log::info!("{:?}", _bmcmd);
} // }
} // }
let dt = DEVICE_TREE.lock(); let dt = DEVICE_TREE.lock();

View File

@ -1,6 +1,6 @@
fn ipc_send(buffer_id, mem_addr, length){ fn ipc_send(buffer_id, mem_addr, length){
// set the ecall // set the ecall
li8(r1, 3); li64(r1, 3);
// Set the buffer ID to be the BufferID // Set the buffer ID to be the BufferID
li64(r2, buffer_id); li64(r2, buffer_id);
lra(r3, r0, mem_addr); lra(r3, r0, mem_addr);
@ -12,14 +12,14 @@ fn ipc_send(buffer_id, mem_addr, length){
fn ipc_recv(buffer_id){ fn ipc_recv(buffer_id){
li8(r1, 4); li64(r1, 4);
eca(); eca();
} }
fn ipc_make_bound_buffer(length) { fn ipc_make_bound_buffer(length) {
li8(r1, 1); li64(r1, 1);
li8(r2, 1); li64(r2, 1);
li64(r3, length); li64(r3, length);
eca(); eca();

View File

@ -74,7 +74,7 @@ fn clear() {
// Define main // Define main
fn main(){ fn main(){
std::Info("Starting the limine framebuffer driver."); std::Info("Starting the limine framebuffer driver.");
// un();
li64(r100, 300); li64(r100, 300);
li64(r101, 300); li64(r101, 300);
li64(r102, 1); li64(r102, 1);