Update dev image for OSDK and bump version to 0.4.0

This commit is contained in:
Zhang Junyang
2024-02-27 11:23:06 +08:00
committed by Tate, Hongliang Tian
parent 674c35079c
commit bd878dd1c9
42 changed files with 188 additions and 153 deletions

View File

@ -90,9 +90,7 @@ pub struct BarManager {
impl BarManager {
/// Gain access to the BAR space and return None if that BAR is set to be invisible or absent.
pub fn bar(&self, idx: u8) -> Option<Bar> {
let Some((bar, visible)) = self.bars[idx as usize].clone() else {
return None;
};
let (bar, visible) = self.bars[idx as usize].clone()?;
if visible {
Some(bar)
} else {

View File

@ -2,14 +2,13 @@
use alloc::vec;
use core::{
iter::Iterator,
marker::PhantomData,
ops::{BitAnd, BitOr, Not, Range},
};
use pod::Pod;
use super::{frame_allocator, HasPaddr, Paddr, VmIo};
use super::{frame_allocator, HasPaddr, VmIo};
use crate::{config::PAGE_SIZE, prelude::*, Error};
/// A collection of page frames (physical memory pages).

View File

@ -4,7 +4,7 @@ use core::ops::Range;
use bitflags::bitflags;
use super::{is_page_aligned, MapArea, MemorySet, Vaddr, VmFrameVec, VmIo};
use super::{is_page_aligned, MapArea, MemorySet, VmFrameVec, VmIo};
use crate::{arch::mm::PageTableFlags, config::PAGE_SIZE, prelude::*, sync::Mutex, Error};
/// Virtual memory space.