From 4514e9870a58dd2b708f7d5f002cb6dff7b8e248 Mon Sep 17 00:00:00 2001 From: MemoryShore <1353318529@qq.com> Date: Tue, 15 Oct 2024 00:47:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=90=AF=E5=8A=A8=E6=97=B6pa?= =?UTF-8?q?nic=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/src/driver/video/mod.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/kernel/src/driver/video/mod.rs b/kernel/src/driver/video/mod.rs index a36a5be82..42c4249ad 100644 --- a/kernel/src/driver/video/mod.rs +++ b/kernel/src/driver/video/mod.rs @@ -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}; @@ -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 = 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)