mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-23 17:33:23 +00:00
Refactor framebuffer
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
ef898e572c
commit
88f08de3af
@ -1,5 +1,8 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use alloc::string::ToString;
|
||||
|
||||
use aster_framebuffer::{CONSOLE_NAME, FRAMEBUFFER_CONSOLE};
|
||||
use log::info;
|
||||
|
||||
pub fn init() {
|
||||
@ -7,4 +10,8 @@ pub fn init() {
|
||||
for (name, _) in aster_input::all_devices() {
|
||||
info!("Found Input device, name:{}", name);
|
||||
}
|
||||
|
||||
if let Some(console) = FRAMEBUFFER_CONSOLE.get() {
|
||||
aster_console::register_device(CONSOLE_NAME.to_string(), console.clone());
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,7 @@
|
||||
#![feature(associated_type_defaults)]
|
||||
#![register_tool(component_access_control)]
|
||||
|
||||
use aster_framebuffer::FRAMEBUFFER_CONSOLE;
|
||||
use kcmdline::KCmdlineArg;
|
||||
use ostd::{
|
||||
arch::qemu::{exit_qemu, QemuExitCode},
|
||||
@ -145,6 +146,13 @@ fn init_thread() {
|
||||
|
||||
print_banner();
|
||||
|
||||
// FIXME: CI fails due to suspected performance issues with the framebuffer console.
|
||||
// Additionally, userspace program may render GUIs using the framebuffer,
|
||||
// so we disable the framebuffer console here.
|
||||
if let Some(console) = FRAMEBUFFER_CONSOLE.get() {
|
||||
console.disable();
|
||||
};
|
||||
|
||||
let karg: KCmdlineArg = boot_info().kernel_cmdline.as_str().into();
|
||||
|
||||
let initproc = Process::spawn_user_process(
|
||||
|
Reference in New Issue
Block a user