mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-18 03:56:42 +00:00
Fix boot frambuffer usage
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
6b87ff03ac
commit
bbca1a2a80
@ -25,7 +25,7 @@ pub(crate) static WRITER: Once<SpinLock<Writer>> = Once::new();
|
||||
|
||||
pub(crate) fn init() {
|
||||
let mut writer = {
|
||||
let framebuffer = boot::get_framebuffer_info();
|
||||
let framebuffer = boot::framebuffer_arg();
|
||||
let mut writer = None;
|
||||
let mut size = 0;
|
||||
for i in jinux_frame::vm::FRAMEBUFFER_REGIONS.get().unwrap().iter() {
|
||||
@ -34,7 +34,7 @@ pub(crate) fn init() {
|
||||
|
||||
let page_size = size / PAGE_SIZE;
|
||||
|
||||
let start_paddr = framebuffer.address.as_ptr().unwrap().addr();
|
||||
let start_paddr = framebuffer.address;
|
||||
let io_mem =
|
||||
IoMem::new(start_paddr..(start_paddr + jinux_frame::config::PAGE_SIZE * page_size))
|
||||
.unwrap();
|
||||
|
@ -25,7 +25,8 @@ fn panic(info: &PanicInfo) -> ! {
|
||||
fn test_input() {
|
||||
x86_64::instructions::interrupts::enable();
|
||||
println!("please input value into console to pass this test");
|
||||
jinux_std::driver::tty::register_serial_input_callback(input_callback);
|
||||
// FIXME: Where is tty?
|
||||
// jinux_std::driver::tty::register_serial_input_callback(input_callback);
|
||||
unsafe {
|
||||
while INPUT_VALUE == 0 {
|
||||
x86_64::instructions::hlt();
|
||||
|
@ -21,7 +21,7 @@ fn panic(info: &PanicInfo) -> ! {
|
||||
|
||||
#[test_case]
|
||||
fn test_framebuffer() {
|
||||
for i in 0..30 {
|
||||
for _i in 0..30 {
|
||||
jinux_framebuffer::println!("test_println!");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user