rust add tlb callback

This commit is contained in:
Philipp Takacs
2023-04-05 11:26:02 +02:00
committed by Kevin Schneider
parent 0729dc0312
commit a9f0dabc64
4 changed files with 103 additions and 2 deletions

View File

@@ -93,6 +93,8 @@ bitflags! {
const MEM_INVALID = Self::MEM_READ_INVALID.bits | Self::MEM_WRITE_INVALID.bits | Self::MEM_FETCH_INVALID.bits;
const MEM_ALL = Self::MEM_VALID.bits | Self::MEM_INVALID.bits;
const TLB = (1 << 17);
}
}
@@ -239,3 +241,10 @@ pub enum ControlType {
UC_CTL_IO_READ = 1<<31,
UC_CTL_IO_WRITE = 1<<30,
}
#[repr(C)]
#[derive(Debug, Clone, Copy)]
pub struct TlbEntry {
pub paddr: u64,
pub perms: Permission,
}