arm_64 exception vector and el2 stack

Stefan Kalkowski stefan.kalkowski at genode-labs.com
Tue Jan 3 16:09:59 CET 2023


Hello Michael,

On Tue, Jan 03, 2023 at 12:29:31PM +0100, Michael Grunditz wrote:
> Hi
> 
> Where does Genode/base-hw write the exception vector to the address that
> hypervisor_exception_vector reports it?

The hypervisor_exception_vector gets mapped at a later point during
kernel initialization. But it needs to be set in the corresponding EL2
register while the bootstrap code is still in EL2 to be able to return
later to it. It is not useable for debugging kernel/bootstrap issues
anyway. So do not mind, if you cannot see anything useful when
provoking a machine exception in this stage. If you want to use it as
debug utility, you can use the u-boot exception vector, like you
already did.

> 
> It doesn't work. If I leave out the vbar setting I get exceptions from
> uboot if I do something stupid. If not , nothing.
> But of course, I might be wrong it is just that I would expect exceptions.
> 
> For example: When I by mistake put NR_OF_CPUS inconsistently., I get
> nothing if vbar set, if not, trigger assert. Not sure how this relates
> (seems odd ) but I think that it is a hint.
> 
> The el2_stack seems like a very high address.

This is correct, but it is simply at the higher area of the virtual
64-bit address space, like the whole kernel/hypervisor code too.

Regards
Stefan

> 
> Thanks,
> 
> Michael

> _______________________________________________
> Genode users mailing list
> users at lists.genode.org
> https://lists.genode.org/listinfo/users


-- 
Stefan Kalkowski
Genode labs

https://github.com/skalk | https://genode.org



More information about the users mailing list