Skip to content

Conversation

@miguelafsilva5
Copy link
Member

PR description

This PR introduces support for slave-side MMIO protection. This is needed on MCU platforms that otherwise would require each device to be mapped in the MPU. With this PR, the entire MMIO region(s) is mapped on the MPU and each architecture/platform needs to implement a functions that enables and controls the access to each device. This function is called during vm device initialization.

It is important to note that, when installing an emul handler for a device inside the mmio region, if slave side mmio protection is enabled, we have to unmap the device memory range.

This PR was only tested for TC4, as it is the current platform that needs this feature. Before accepting the PR we have to make sure all other platforms are running as expected.
Platforms working:

  • TC4
  • qemu-aarch32-virt
  • qemu-aarch64-virt
  • qemu-riscv32-virt
  • qemu-riscv64-virt
  • fvp-a
  • fvp-a-aarch32
  • fvp-r
  • fvp-r-aarch32
  • ...

The mmio regions present in the platform description are to be mapped
accessible for all address spaces.

Signed-off-by: Miguel Silva <[email protected]>
Each architecture needs to implement their access control function.
This function is called during the dev init for vms, and is executed instead
of the original memory mapping.

Signed-off-by: Miguel Silva <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants