添加帧缓冲区抽象并实现vesafb的驱动 (#483)

- 添加bootparams对象
- 修正由于bus的driver、device强弱引用关系 不正确从而导致对象被释放的bug
- 添加vesafb的驱动
- 实现framebuffer抽象层
- 为通用帧缓冲区抽象实现sysfs的属性
- 修改设备号DeviceNumber的定义
- 仿照linux,添加initcall,并在第一个内核线程中,调用他们。
This commit is contained in:
LoGin
2024-01-01 11:46:51 +08:00
committed by GitHub
parent e3eb08d4d7
commit c566df451c
45 changed files with 2179 additions and 391 deletions

View File

@ -13,7 +13,10 @@ use crate::{
net::{generate_iface_id, NET_DRIVERS},
time::Instant,
};
use alloc::{string::String, sync::Arc};
use alloc::{
string::String,
sync::{Arc, Weak},
};
use core::{
cell::UnsafeCell,
fmt::Debug,
@ -218,11 +221,11 @@ impl Driver for E1000EInterface {
todo!()
}
fn bus(&self) -> Option<Arc<dyn Bus>> {
fn bus(&self) -> Option<Weak<dyn Bus>> {
todo!()
}
fn set_bus(&self, _bus: Option<Arc<dyn Bus>>) {
fn set_bus(&self, _bus: Option<Weak<dyn Bus>>) {
todo!()
}
}