pci重构+pcie支持 (#235)

* pci重构+pcie支持

* pci重构测试完成

* 修正makefile的问题

* 小修改

* 修改函数名字
This commit is contained in:
YJwu2023
2023-04-09 12:30:02 +08:00
committed by GitHub
parent 5c9a63df83
commit 78bf93f02f
56 changed files with 1478 additions and 501 deletions

View File

@ -1,23 +1,26 @@
use core::{ptr::null_mut, sync::atomic::{AtomicBool, Ordering}};
use core::{
ptr::null_mut,
sync::atomic::{AtomicBool, Ordering},
};
use alloc::sync::Arc;
use crate::{
exception::softirq::{SoftirqNumber, SoftirqVec, softirq_vectors},
exception::softirq::{softirq_vectors, SoftirqNumber, SoftirqVec},
include::bindings::bindings::video_refresh_framebuffer,
};
#[derive(Debug)]
pub struct VideoRefreshFramebuffer{
running: AtomicBool
pub struct VideoRefreshFramebuffer {
running: AtomicBool,
}
impl SoftirqVec for VideoRefreshFramebuffer {
fn run(&self) {
if self.set_run() == false{
if self.set_run() == false {
return;
}
unsafe {
video_refresh_framebuffer(null_mut());
}
@ -28,7 +31,7 @@ impl SoftirqVec for VideoRefreshFramebuffer {
impl VideoRefreshFramebuffer {
pub fn new() -> VideoRefreshFramebuffer {
VideoRefreshFramebuffer {
running: AtomicBool::new(false)
running: AtomicBool::new(false),
}
}