Skip to content

Commit

Permalink
修复启动时panic错误
Browse files Browse the repository at this point in the history
  • Loading branch information
MemoryShore committed Oct 14, 2024
1 parent 2edd19b commit aad25d7
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions kernel/src/driver/video/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ use crate::{
rwlock::{RwLock, RwLockReadGuard},
spinlock::SpinLock,
},
mm::{
allocator::page_frame::PageFrameCount, kernel_mapper::KernelMapper, mmio_buddy::mmio_pool,
page::EntryFlags, MemoryManagementArch,
},
mm::{mmio_buddy::mmio_pool, page::EntryFlags},
time::timer::{Timer, TimerFunction},
};
use alloc::{boxed::Box, sync::Arc};
Expand Down Expand Up @@ -102,15 +99,8 @@ impl VideoRefreshManager {
}
// 地址映射
let paddr = bp.screen_info.lfb_base;
let count = PageFrameCount::new(
page_align_up(frame_buffer_info_guard.buf_size()) / MMArch::PAGE_SIZE,
);
let page_flags: EntryFlags<MMArch> = EntryFlags::new().set_execute(true).set_write(true);

let mut kernel_mapper = KernelMapper::lock();
let mut kernel_mapper = kernel_mapper.as_mut();
assert!(kernel_mapper.is_some());
let mut vaddr = buf_vaddr;
unsafe {
mmio_guard
.map_phys_with_flags(paddr, page_align_up(buf_size), page_flags)
Expand Down

0 comments on commit aad25d7

Please sign in to comment.