From 76fe92f835c017523ac27c556a56acdf904a441f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valkony=20Bal=C3=A1zs?= Date: Fri, 23 Apr 2021 21:28:41 +0000 Subject: [PATCH] Unsafe block javitasa --- mykernel/rust/src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mykernel/rust/src/main.rs b/mykernel/rust/src/main.rs index a75ddd4..2770cd3 100644 --- a/mykernel/rust/src/main.rs +++ b/mykernel/rust/src/main.rs @@ -49,8 +49,9 @@ extern crate rlibc; #[no_mangle] // don't mangle the name of this function fn _start() -> ! { /*** NOTE: this code runs on all cores in parallel ***/ - if bootboot::bootboot.fb_scanline > 0 { - unsafe { + unsafe { + if bootboot::bootboot.fb_scanline > 0 { + let fb = &bootboot::fb as *const u8 as u64; // cross-hair to see screen dimension detected correctly