Hey,
I am now able to develop kernel modules for the R9000, thanks to Voxel
ARM defines multiple operating modes: User, Supervisor, Hypervisor, Secure Monitor.
Every kernel module is being executed in Supervisor mode, but my goal is to execute code in Hypervisor mode. Later I would like to write my own hypervisor and place it on the R9000, but for now I only want to get into the mode.
Entering Hypervisor Mode is being done through the hvc call ("hvc #0"), but it has some prerequisites(see ARMv7-manual (B9-1983):
Everything is given (Virtualization Extensions, Not Secure, Supervisor Mode), except for the HCE bit being not 1. Modifying the HCE bit is only possible in secure world.
The big question is now, how can I get into the secure world, set the HCE bit to 1 and return?
I know that there is the smc call for changing betweens the worlds, and I also found code for changing the bit, but I think you would need to modify the monitor handler and I don't how to do this.
Could someone please help me? Is there maybe another way to get into Hypervisor mode?
I am now able to develop kernel modules for the R9000, thanks to Voxel

ARM defines multiple operating modes: User, Supervisor, Hypervisor, Secure Monitor.
Every kernel module is being executed in Supervisor mode, but my goal is to execute code in Hypervisor mode. Later I would like to write my own hypervisor and place it on the R9000, but for now I only want to get into the mode.
Entering Hypervisor Mode is being done through the hvc call ("hvc #0"), but it has some prerequisites(see ARMv7-manual (B9-1983):
Everything is given (Virtualization Extensions, Not Secure, Supervisor Mode), except for the HCE bit being not 1. Modifying the HCE bit is only possible in secure world.
The big question is now, how can I get into the secure world, set the HCE bit to 1 and return?
I know that there is the smc call for changing betweens the worlds, and I also found code for changing the bit, but I think you would need to modify the monitor handler and I don't how to do this.
Could someone please help me? Is there maybe another way to get into Hypervisor mode?