This commit is contained in:
Berkus Decker 2019-01-22 14:59:19 +02:00
parent 90fbfd6d7e
commit 9c2701f434
2 changed files with 6 additions and 2 deletions

View File

@ -60,7 +60,7 @@ fn kmain() -> ! {
display.rect(10, 10, 250, 250, Color::rgb(32, 96, 64)); display.rect(10, 10, 250, 250, Color::rgb(32, 96, 64));
display.draw_text(50, 50, "Hello there!", Color::rgb(128, 192, 255)); display.draw_text(50, 50, "Hello there!", Color::rgb(128, 192, 255));
let mut buf = [0u8; 64]; // let mut buf = [0u8; 64];
// Crashes if uncommenting next line: vvv // Crashes if uncommenting next line: vvv
// let s = write_to::show(&mut buf, format_args!("Display width {}", display.width)); // let s = write_to::show(&mut buf, format_args!("Display width {}", display.width));
// So, some rust runtime things are breaking it, why? // So, some rust runtime things are breaking it, why?
@ -83,6 +83,10 @@ fn kmain() -> ! {
display.draw_text(170, 70, "BLUE", Color::blue()); display.draw_text(170, 70, "BLUE", Color::blue());
} }
// unsafe {
// mmu::init();
// }
// writeln!(uart, "Bye, going to sleep now"); // writeln!(uart, "Bye, going to sleep now");
// qemu_aarch64_exit() // qemu_aarch64_exit()
endless_sleep() endless_sleep()

View File

@ -65,7 +65,7 @@ impl VC {
// writeln!(uart, "inited fb_info #2"); // writeln!(uart, "inited fb_info #2");
Some(Display::new( Some(Display::new(
fb_info.pointer, fb_info.pointer & 0x3fff_ffff,
fb_info.size, fb_info.size,
fb_info.depth, fb_info.depth,
fb_info.pitch, fb_info.pitch,