|
|
@ -46,6 +46,7 @@ const fn calc_num_pages(start: u64, size: u64) -> u64 {
|
|
|
|
((start & (PAGE_SIZE as u64 - 1)) + size + (PAGE_SIZE as u64 - 1)) >> 12
|
|
|
|
((start & (PAGE_SIZE as u64 - 1)) + size + (PAGE_SIZE as u64 - 1)) >> 12
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[allow(clippy::mutex_atomic)]
|
|
|
|
#[derive(Debug)]
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct PciLeech {
|
|
|
|
pub struct PciLeech {
|
|
|
|
handle: Arc<Mutex<HANDLE>>,
|
|
|
|
handle: Arc<Mutex<HANDLE>>,
|
|
|
@ -81,6 +82,7 @@ impl PciLeech {
|
|
|
|
Self::with_mapping(device, memmap)
|
|
|
|
Self::with_mapping(device, memmap)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[allow(clippy::mutex_atomic)]
|
|
|
|
fn with_mapping(device: &str, mem_map: MemoryMap<(Address, usize)>) -> Result<Self> {
|
|
|
|
fn with_mapping(device: &str, mem_map: MemoryMap<(Address, usize)>) -> Result<Self> {
|
|
|
|
// open device
|
|
|
|
// open device
|
|
|
|
let mut conf = build_lc_config(device);
|
|
|
|
let mut conf = build_lc_config(device);
|
|
|
|