diff --git a/kernel/src/arch/x86_64/graphics.rs b/kernel/src/arch/x86_64/graphics.rs index 2b8ca57e..adb7c4da 100644 --- a/kernel/src/arch/x86_64/graphics.rs +++ b/kernel/src/arch/x86_64/graphics.rs @@ -18,6 +18,7 @@ pub static DISPLAY: Lazy> = 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> = Lazy::new(|| { color: Rgb888::WHITE, }); log::info!("Graphics initialised"); + log::info!( + "Graphics front ptr {:?}", + fb1.address.as_ptr().unwrap() as *const u8 + ); m }); diff --git a/kernel/src/holeybytes/mem.rs b/kernel/src/holeybytes/mem.rs index 8c7fdd97..6be7c907 100644 --- a/kernel/src/holeybytes/mem.rs +++ b/kernel/src/holeybytes/mem.rs @@ -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(()) } diff --git a/repbuild/holeybytes/limine_framebuffer_driver.rhai b/repbuild/holeybytes/limine_framebuffer_driver.rhai index e172e4cf..22b09f70 100644 --- a/repbuild/holeybytes/limine_framebuffer_driver.rhai +++ b/repbuild/holeybytes/limine_framebuffer_driver.rhai @@ -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(); \ No newline at end of file +main(); \ No newline at end of file diff --git a/repbuild/holeybytes/main.rhai b/repbuild/holeybytes/main.rhai index c832874f..d4e258a1 100644 --- a/repbuild/holeybytes/main.rhai +++ b/repbuild/holeybytes/main.rhai @@ -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(); } diff --git a/repbuild/holeybytes/vfs_test.rhai b/repbuild/holeybytes/vfs_test.rhai index 3a37b07d..aa4b8481 100644 --- a/repbuild/holeybytes/vfs_test.rhai +++ b/repbuild/holeybytes/vfs_test.rhai @@ -11,8 +11,10 @@ fn main(){ std::ipc_send(2, str, str.len); std::ipc_recv(2); + // load r2 + // loop through r3 - + // un(); tx(); }