On 06/20/2017 04:42 PM, rijurekha@...71... wrote:
Analyzed the following files: (a) base-hw/src/core/spec/arm/kernel/cpu.cc (calls init trustzone) (b) base-hw/src/core/spec/imx53/trustzone/platform_support.cc (defines init trustzone where monitor exception entry is assigned with _mon_kernel_entry) (c) base-hw/src/core/spec/arm_v7/trustzone/mode_transition.s defines _mon_kernel_entry, which is the exception vector table in monitor mode. The exception handlers call "_nonsecure_to_secure exception_type, pc_adjust", which sets the appropriate pc based on lr values. (d) base-hw/src/core/include/spec/arm_v7/macros_support.s has the register bank save and restore macros.
For my doubt (1) above, does each precise external abort go through this monitor exception handler function? How does that explain _state->ip is the correct variable (since pc is already adjusted based on lr)?
As previously said, its hard to reason about this, because the whole peripheral connection and behaviour is largely board/vendor specific. Probably almost all external data-aborts are taken to monitor mode, but I can also imagine that some access (e.g. misaligned access on a device granted to the normal world) might trigger an appropriated data-abort to the normal world.
When a data-abort is taken by the monitor mode, it goes through that exception handler.
For my doubt (2) above, are the _state variables mapped to the memory addresses where the normal world registers are restored from?
Yes.
Is that how any change made by vmm is reflected in the normal world registers?
Yes.
Regards Stefan
Thanks! Riju
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main