forked from AbleOS/holey-bytes
Move stuff, deprecate softpage
This commit is contained in:
parent
3fdf936f77
commit
af1a7d3bfa
|
@ -3,7 +3,7 @@
|
||||||
use {
|
use {
|
||||||
hbbytecode::valider::validate,
|
hbbytecode::valider::validate,
|
||||||
hbvm::{
|
hbvm::{
|
||||||
softpaging::{
|
mem::softpaging::{
|
||||||
paging::{PageTable, Permission},
|
paging::{PageTable, Permission},
|
||||||
HandlePageFault, PageSize, SoftPagedMem,
|
HandlePageFault, PageSize, SoftPagedMem,
|
||||||
},
|
},
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#[cfg(feature = "alloc")]
|
#[cfg(feature = "alloc")]
|
||||||
extern crate alloc;
|
extern crate alloc;
|
||||||
|
|
||||||
pub mod softpaging;
|
pub mod mem;
|
||||||
pub mod value;
|
pub mod value;
|
||||||
|
|
||||||
mod bmc;
|
mod bmc;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use {
|
use {
|
||||||
hbbytecode::valider::validate,
|
hbbytecode::valider::validate,
|
||||||
hbvm::{
|
hbvm::{
|
||||||
softpaging::{paging::PageTable, HandlePageFault, PageSize, SoftPagedMem},
|
mem::softpaging::{paging::PageTable, HandlePageFault, PageSize, SoftPagedMem},
|
||||||
MemoryAccessReason, Vm,
|
MemoryAccessReason, Vm,
|
||||||
},
|
},
|
||||||
std::io::{stdin, Read},
|
std::io::{stdin, Read},
|
||||||
|
@ -38,7 +38,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
.map(
|
.map(
|
||||||
data,
|
data,
|
||||||
8192,
|
8192,
|
||||||
hbvm::softpaging::paging::Permission::Write,
|
hbvm::mem::softpaging::paging::Permission::Write,
|
||||||
PageSize::Size4K,
|
PageSize::Size4K,
|
||||||
)
|
)
|
||||||
.unwrap();
|
.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
|
//! Platform independent, software paged memory implementation
|
||||||
|
|
||||||
use self::lookup::{AddrPageLookupError, AddrPageLookupOk, AddrPageLookuper};
|
|
||||||
|
|
||||||
pub mod lookup;
|
pub mod lookup;
|
||||||
pub mod paging;
|
pub mod paging;
|
||||||
|
|
||||||
|
@ -9,12 +7,14 @@ pub mod paging;
|
||||||
pub mod mapping;
|
pub mod mapping;
|
||||||
|
|
||||||
use {
|
use {
|
||||||
super::{LoadError, Memory, MemoryAccessReason, StoreError},
|
crate::{LoadError, Memory, MemoryAccessReason, StoreError},
|
||||||
core::slice::SliceIndex,
|
core::slice::SliceIndex,
|
||||||
|
lookup::{AddrPageLookupError, AddrPageLookupOk, AddrPageLookuper},
|
||||||
paging::{PageTable, Permission},
|
paging::{PageTable, Permission},
|
||||||
};
|
};
|
||||||
|
|
||||||
/// HoleyBytes software paged memory
|
/// HoleyBytes software paged memory
|
||||||
|
#[deprecated]
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct SoftPagedMem<'p, PfH> {
|
pub struct SoftPagedMem<'p, PfH> {
|
||||||
/// Root page table
|
/// Root page table
|
Loading…
Reference in a new issue