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
[Discord](https://discord.gg/JrKVukDtgs)
<img src="https://img.shields.io/liberapay/patrons/AbleTheAbove.svg?logo=liberapay">
# Compiling

View File

@ -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();

View File

@ -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();

View File

@ -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);