Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map devices with address offsets. #43

Open
luodeb opened this issue Dec 6, 2024 · 0 comments
Open

Map devices with address offsets. #43

luodeb opened this issue Dec 6, 2024 · 0 comments

Comments

@luodeb
Copy link
Contributor

luodeb commented Dec 6, 2024

eg. ARM GICC in Rust Shyper

        #[cfg(not(feature = "gicv3"))]
        PassthroughRegion { ipa: Platform::GICC_BASE, pa: Platform::GICV_BASE, length: 0x2000, dev_property: true },

Possible Solution

Add a field in memory_regions or emu_devices, pa or offect

/// A part of `AxVMConfig`, which represents a memory region.
#[derive(Debug, Default, Clone, serde::Serialize, serde::Deserialize)]
pub struct VmMemConfig {
    /// The start address of the memory region in GPA.
    pub gpa: usize,
    /// The start address of the memory region in PA.
    pub pa: usize,
    /// The size of the memory region.
    pub size: usize,
    /// The mappings flags of the memory region, refers to `MappingFlags` provided by `axaddrspace`.
    pub flags: usize,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant