Added inner memory access
This commit is contained in:
parent
bf50bcb203
commit
2d2978eec7
|
@ -1,3 +1,5 @@
|
||||||
|
use hbvm::softpaging::paging::PageTable;
|
||||||
|
|
||||||
use {
|
use {
|
||||||
hbbytecode::valider::validate,
|
hbbytecode::valider::validate,
|
||||||
hbvm::{
|
hbvm::{
|
||||||
|
@ -61,7 +63,7 @@ impl HandlePageFault for TestTrapHandler {
|
||||||
fn page_fault(
|
fn page_fault(
|
||||||
&mut self,
|
&mut self,
|
||||||
_: MemoryAccessReason,
|
_: MemoryAccessReason,
|
||||||
//_: &mut Memory,
|
_: &mut PageTable,
|
||||||
_: u64,
|
_: u64,
|
||||||
_: PageSize,
|
_: PageSize,
|
||||||
_: *mut u8,
|
_: *mut u8,
|
||||||
|
|
|
@ -98,7 +98,13 @@ impl<PfHandler: HandlePageFault> SoftPagedMem<PfHandler> {
|
||||||
// No page found
|
// No page found
|
||||||
Some(Err(AddrPageLookupError { addr, size })) => {
|
Some(Err(AddrPageLookupError { addr, size })) => {
|
||||||
// Attempt to execute page fault handler
|
// Attempt to execute page fault handler
|
||||||
if self.pf_handler.page_fault(reason, addr, size, dst) {
|
if self.pf_handler.page_fault(
|
||||||
|
reason,
|
||||||
|
unsafe { &mut *self.root_pt },
|
||||||
|
addr,
|
||||||
|
size,
|
||||||
|
dst,
|
||||||
|
) {
|
||||||
// Shift the splitter address
|
// Shift the splitter address
|
||||||
pspl.bump(size);
|
pspl.bump(size);
|
||||||
|
|
||||||
|
@ -465,7 +471,7 @@ pub trait HandlePageFault {
|
||||||
fn page_fault(
|
fn page_fault(
|
||||||
&mut self,
|
&mut self,
|
||||||
reason: MemoryAccessReason,
|
reason: MemoryAccessReason,
|
||||||
// memory: &mut SoftPagedMem<Self>, TODO: Make work
|
pagetable: &mut PageTable,
|
||||||
vaddr: u64,
|
vaddr: u64,
|
||||||
size: PageSize,
|
size: PageSize,
|
||||||
dataptr: *mut u8,
|
dataptr: *mut u8,
|
||||||
|
|
Loading…
Reference in a new issue