virtio-blk worked.
This commit is contained in:
parent
2d34cab989
commit
eca5ee2eb7
12 changed files with 145 additions and 11 deletions
|
@ -3,15 +3,19 @@ use super::PageTableEntry;
|
|||
use core::fmt::{self, Debug, Formatter};
|
||||
|
||||
/// Definitions
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq)]
|
||||
pub struct PhysAddr(pub usize);
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq)]
|
||||
pub struct VirtAddr(pub usize);
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq)]
|
||||
pub struct PhysPageNum(pub usize);
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq)]
|
||||
pub struct VirtPageNum(pub usize);
|
||||
|
||||
|
@ -144,6 +148,11 @@ impl StepByOne for VirtPageNum {
|
|||
self.0 += 1;
|
||||
}
|
||||
}
|
||||
impl StepByOne for PhysPageNum {
|
||||
fn step(&mut self) {
|
||||
self.0 += 1;
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct SimpleRange<T> where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue