forked from AbleOS/holey-bytes
Move stuff, deprecate softpage
This commit is contained in:
parent
7dc8c6cca4
commit
bcb0ec41e2
|
@ -3,7 +3,7 @@
|
|||
use {
|
||||
hbbytecode::valider::validate,
|
||||
hbvm::{
|
||||
softpaging::{
|
||||
mem::softpaging::{
|
||||
paging::{PageTable, Permission},
|
||||
HandlePageFault, PageSize, SoftPagedMem,
|
||||
},
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#[cfg(feature = "alloc")]
|
||||
extern crate alloc;
|
||||
|
||||
pub mod softpaging;
|
||||
pub mod mem;
|
||||
pub mod value;
|
||||
|
||||
mod bmc;
|
||||
|
|
|
@ -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
3
hbvm/src/mem/mod.rs
Normal file
|
@ -0,0 +1,3 @@
|
|||
//! Memory implementations
|
||||
|
||||
pub mod softpaging;
|
|
@ -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
|
Loading…
Reference in a new issue