mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-25 18:23:22 +00:00
设备驱动模型:完善platform bus相关内容。并注册串口到sysfs (#403)
* 完成初始化platform bus * 删除旧的sysfs * 把uart驱动移动到tty/serial文件夹下 * 完成将串口挂载到sysfs * 修复vfs系统调用未能follow symlink的问题 * 修复shell未能正确获取pwd的问题
This commit is contained in:
@ -8,8 +8,7 @@ use alloc::{boxed::Box, sync::Arc};
|
||||
|
||||
use crate::{
|
||||
arch::MMArch,
|
||||
driver::uart::uart_device::c_uart_send_str,
|
||||
driver::uart::uart_device::UartPort::COM1,
|
||||
driver::tty::serial::serial8250::send_to_default_serial8250_port,
|
||||
include::bindings::bindings::{
|
||||
multiboot2_get_Framebuffer_info, multiboot2_iter, multiboot_tag_framebuffer_info_t,
|
||||
FRAME_BUFFER_MAPPING_OFFSET, SPECIAL_MEMOEY_MAPPING_VIRT_ADDR_BASE,
|
||||
@ -226,7 +225,7 @@ impl VideoRefreshManager {
|
||||
.unwrap();
|
||||
|
||||
let init_text = "Video driver to map.\n\0";
|
||||
c_uart_send_str(COM1 as u16, init_text.as_ptr());
|
||||
send_to_default_serial8250_port(init_text.as_bytes());
|
||||
|
||||
//地址映射
|
||||
let paddr = PhysAddr::new(fb_info.framebuffer_addr as usize);
|
||||
@ -245,7 +244,7 @@ impl VideoRefreshManager {
|
||||
__MAMAGER = Some(result);
|
||||
|
||||
let init_text = "Video driver initialized.\n\0";
|
||||
c_uart_send_str(COM1 as u16, init_text.as_ptr());
|
||||
send_to_default_serial8250_port(init_text.as_bytes());
|
||||
return Ok(());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user