From 04a8fccd2f7990e5d152a53d2dd3ea776625aea0 Mon Sep 17 00:00:00 2001 From: Yuke Peng Date: Tue, 29 Apr 2025 14:21:51 +0800 Subject: [PATCH] Add Framebuffer region into filter in `IoMemAllocatorBuilder` --- ostd/src/arch/x86/io.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ostd/src/arch/x86/io.rs b/ostd/src/arch/x86/io.rs index 9e1dbfba9..6635b59dd 100644 --- a/ostd/src/arch/x86/io.rs +++ b/ostd/src/arch/x86/io.rs @@ -17,7 +17,9 @@ pub(super) fn construct_io_mem_allocator_builder() -> IoMemAllocatorBuilder { let mut ranges = Vec::with_capacity(2); let reserved_filter = regions.iter().filter(|r| { - r.typ() != (MemoryRegionType::Unknown) && r.typ() != (MemoryRegionType::Reserved) + r.typ() != MemoryRegionType::Unknown + && r.typ() != MemoryRegionType::Reserved + && r.typ() != MemoryRegionType::Framebuffer }); // Find the TOLM (Top of Low Memory) and initialize Low MMIO region (TOLM ~ LOW_MMIO_TOP).