Accessing virtual address of normal world in secure world in genode-tz

rijurekha at ...71... rijurekha at ...71...
Mon Jun 12 18:10:49 CEST 2017


Can we use the following function in
repos/os/src/server/tz_vmm/include/ram.h for this? Take normal world
virtal address from _state->ip, get corresponding physical address using
va_to_pa function, and call the following with that physical address?

Genode::addr_t va(Genode::addr_t phys)
{
if ((phys < _base) || (phys > (_base + _size)))
throw Invalid_addr();
return _local + (phys - _base);
}

Looks like a one-to-one mapping between va to pa here. So should the
following give the correct value in _state->ip?

Genode::addr_t temp = va_to_pa(_state->ip);
printf("ip val:%d\n",*(int*)temp);

Thanks!
Riju


> Hello
> I am trying to convert virtual address (corresponding to normal world)
> stored in instruction pointer into virtual address in tz_vmm, in order to
> read the instruction which caused the exception in normal world linux and
> process accordingly. Though we do have physical address (using va_to_pa
> function), but it is not helping in any way to read the instruction stored
> at that physical address. Is there any way other than switching MMU off.
>
> Thanks
> Abhishek
> ------------------------------------------------------------------------------
> 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 at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main
>





More information about the users mailing list