1
0
Fork 0
forked from koniifer/ableos

Move stuff, deprecate softpage

This commit is contained in:
Erin 2023-08-15 16:32:59 +02:00
parent 3fdf936f77
commit af1a7d3bfa
8 changed files with 10 additions and 7 deletions

View file

@ -3,7 +3,7 @@
use {
hbbytecode::valider::validate,
hbvm::{
softpaging::{
mem::softpaging::{
paging::{PageTable, Permission},
HandlePageFault, PageSize, SoftPagedMem,
},

View file

@ -17,7 +17,7 @@
#[cfg(feature = "alloc")]
extern crate alloc;
pub mod softpaging;
pub mod mem;
pub mod value;
mod bmc;

View file

@ -1,7 +1,7 @@
use {
hbbytecode::valider::validate,
hbvm::{
softpaging::{paging::PageTable, HandlePageFault, PageSize, SoftPagedMem},
mem::softpaging::{paging::PageTable, HandlePageFault, PageSize, SoftPagedMem},
MemoryAccessReason, Vm,
},
std::io::{stdin, Read},
@ -38,7 +38,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.map(
data,
8192,
hbvm::softpaging::paging::Permission::Write,
hbvm::mem::softpaging::paging::Permission::Write,
PageSize::Size4K,
)
.unwrap();

3
hbvm/src/mem/mod.rs Normal file
View file

@ -0,0 +1,3 @@
//! Memory implementations
pub mod softpaging;

View file

@ -1,7 +1,5 @@
//! Platform independent, software paged memory implementation
use self::lookup::{AddrPageLookupError, AddrPageLookupOk, AddrPageLookuper};
pub mod lookup;
pub mod paging;
@ -9,12 +7,14 @@ pub mod paging;
pub mod mapping;
use {
super::{LoadError, Memory, MemoryAccessReason, StoreError},
crate::{LoadError, Memory, MemoryAccessReason, StoreError},
core::slice::SliceIndex,
lookup::{AddrPageLookupError, AddrPageLookupOk, AddrPageLookuper},
paging::{PageTable, Permission},
};
/// HoleyBytes software paged memory
#[deprecated]
#[derive(Clone, Debug)]
pub struct SoftPagedMem<'p, PfH> {
/// Root page table