Panic rn
This commit is contained in:
parent
b7f9b071bf
commit
631e1dc288
|
@ -18,6 +18,7 @@ pub static DISPLAY: Lazy<Mutex<Display>> = Lazy::new(|| {
|
|||
disp.set_attribute("width", fb1.width);
|
||||
disp.set_attribute("height", fb1.height);
|
||||
disp.set_attribute("bits per pixel", fb1.bpp);
|
||||
// disp.set_attribute("fb ptr", fb1.address.as_ptr().unwrap());
|
||||
dt.devices.insert("Displays".to_string(), alloc::vec![disp]);
|
||||
}
|
||||
let _size: usize = (fb1.width * fb1.height).try_into().unwrap();
|
||||
|
@ -30,6 +31,10 @@ pub static DISPLAY: Lazy<Mutex<Display>> = Lazy::new(|| {
|
|||
color: Rgb888::WHITE,
|
||||
});
|
||||
log::info!("Graphics initialised");
|
||||
log::info!(
|
||||
"Graphics front ptr {:?}",
|
||||
fb1.address.as_ptr().unwrap() as *const u8
|
||||
);
|
||||
m
|
||||
});
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ impl hbvm::mem::Memory for Memory {
|
|||
target: *mut u8,
|
||||
count: usize,
|
||||
) -> Result<(), hbvm::mem::LoadError> {
|
||||
log::info!("Loading memory");
|
||||
core::ptr::copy(addr.get() as *const u8, target, count);
|
||||
Ok(())
|
||||
}
|
||||
|
@ -26,6 +27,8 @@ impl hbvm::mem::Memory for Memory {
|
|||
source: *const u8,
|
||||
count: usize,
|
||||
) -> Result<(), hbvm::mem::StoreError> {
|
||||
log::info!("Storing memory");
|
||||
|
||||
core::ptr::copy(source, addr.get() as *mut u8, count);
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
@ -6,12 +6,21 @@ import "repbuild/hblib/std" as std;
|
|||
|
||||
// Define main
|
||||
fn main(){
|
||||
std::Info("Starting the limine framebuffer driver.");
|
||||
|
||||
li8(r1, 0x7);
|
||||
li8(r2, 0);
|
||||
li64(r3, 1000);
|
||||
|
||||
label("start");
|
||||
// store from a register to a local address
|
||||
// https://git.ablecorp.us/AbleOS/holey-bytes/src/branch/trunk/spec.md#memory-access-operations
|
||||
// st(r1, r2, 0x100, 0x100);
|
||||
st(r1, r2, 0xFFFF8000C0000000, 1);
|
||||
addi64(r2, r2, 1);
|
||||
|
||||
jltu(r2, r3, "start");
|
||||
|
||||
// Terminate execution.
|
||||
tx();
|
||||
}
|
||||
|
||||
main();
|
||||
|
||||
// Terminate execution.
|
||||
tx();
|
||||
main();
|
|
@ -7,8 +7,7 @@ fn main(){
|
|||
std::Debug("XYZ");
|
||||
std::Trace("Trace Deez");
|
||||
|
||||
// let ret = std::open("/file.hbf");
|
||||
// std::Info("" + ret);
|
||||
// std::open("/file.hbf");
|
||||
|
||||
tx();
|
||||
}
|
||||
|
|
|
@ -11,8 +11,10 @@ fn main(){
|
|||
std::ipc_send(2, str, str.len);
|
||||
|
||||
std::ipc_recv(2);
|
||||
// load r2
|
||||
// loop through r3
|
||||
|
||||
|
||||
// un();
|
||||
tx();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue