On 02.08.19 21:01, [email protected] wrote:
> Hi Jan,
>
> Concerning your inputs I still have some questions that I would like to
> clarify
> with you.
>
> Both your cells, root and non-root, access the ICC at 0x1c20000 here. I
> don't
> recall the nature of this resource anymore, maybe it can be split at
> register
> boundaries. If so, define smaller sub-page regions in the root cell and
> had the
> subset of them out for exclusive use by the non-root cell.
>
>
> Currently, you revoke access to the region at 0x1c20000 from the root
> cell when
> creating the non-root cell.
>
>
> The configuration files for both gic-demo and bananapi (from wip/ivshmem2
> jailhouse's branch and queues/jailhouse-ivshmem2) are similar to the ones I
> was
> experimenting with in kernel 4.13.0 (from master jailhouse's branch). However,
> now I'm getting all the unhandled traps (i.e., Unhandled data read at
> 0x1c20060(4)). Could you please explain me how gic-demo was working before
> with
> that kernel and not now (with queues/jailhouse-ivshmem2 from
> http://git.kiszka.org/linux.git/), when for instance the address for CCU was
> the
> same in both cells? For instance, in the configuration files of both cells,
> CCU
The branch on kiszka.org is based on kernel 5.2. That may contain new or
different drivers that are now touching resources they didn't back then in
4.13-times.
> was set like this:
>
> /* CCU */ {
> .phys_start = 0x01c20000,
> .virt_start = 0x01c20000,
> .size = 0x400,
> .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
> JAILHOUSE_MEM_IO | JAILHOUSE_MEM_IO_32,
> },
>
> Moreover, I followed your advice and tried to split the address 0x1c20000 at
> register boundaries. However, I might be doing something wrong as I'm still
> getting unhandled traps. Could you please provide me with an example for this
> particular problem.
Basically, you have to replicate that CCU block above a few times, adjust size
and start addresses, e.g.
{
.phys_start = 0x01c200c0,
.virt_start = 0x01c200c0,
.size = 0x10,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_IO | JAILHOUSE_MEM_IO_32,
},
in order to define a region from 0x01c200c0..0x01c200cf, permitting 32-bit
accesses. Such a region could then be assigned to a non-root cell as a whole
(breaking up sub-page regions on assignment is not possible, in contrast to
page-aligned regions).
> BTW, is it possible to use addresses that are not listed in
> /proc/iomem for entries in config files for cells, i.e., that are not assigned
> to memory mapped devices?
Of course, though you should know why you are assigning a resource. The SoC
manual may explain the semantics of those registers in order to decide.
Alternatively, you can do the following to avoid accesses:
- "#define CONFIG_CRASH_CELL_ON_PANIC 1" in include/jailhouse/config.h
- let the cell trigger the crash -> Linux should now dump a backtrace
that should point to a driver issuing this
- in the future, remove/unbind the driver from the resource prior to
assigning it to a different cell
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
--
You received this message because you are subscribed to the Google Groups
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jailhouse-dev/7e6377fc-e8af-c947-8218-a435a065a597%40siemens.com.