Noux application

Martin Stein martin.stein at ...1...
Thu Nov 19 11:19:43 CET 2015


Hey Joseph,

Am 19.11.2015 um 01:58 schrieb Joseph Lee:
> the problem was that the SDHC driver timed out which then generates the 
> "Completion host signal timed out" error message. It is solved by replacing
> 
>    if (!wait_for<Irqstat>(irq_goal, _delayer)) {
>       PERR("Completion host signal timed out");
> 
> in [1] with
> 
>    if (!wait_for<Irqstat>(irq_goal, _delayer, 3000)) {
>       PERR("Completion host signal timed out %x", read<Irqstat>());

Thank you for the info :)

> I tried to modify trustzone settings for ESDHC MMIO and IRQs  and make
> run/tz_vmm. it hangs when the Linux kernel tries to access the sd_card
> and displays the following error message.
> 
> mxsdhci: MXC Secure Digital Host Controller Interface driver
> mxsdhci: MXC SDHCI Controller Driver.
> [init -> tz_vmm] Cpu state:
> [init -> tz_vmm]   Register     Virt     Phys
> [init -> tz_vmm] ---------------------------------
> [init -> tz_vmm]   r0         = c5bc6e00 [85bc6e00]
> [init -> tz_vmm]   r1         = 00000001 [00000000]
> [init -> tz_vmm]   r2         = c030aef8 [8030aef8]
> [init -> tz_vmm]   r3         = c690e000 [50004000]
> [init -> tz_vmm]   r4         = c5bc6e00 [85bc6e00]
> [init -> tz_vmm]   r5         = c5bc6e00 [85bc6e00]
> [init -> tz_vmm]   r6         = 00000000 [00000000]
> [init -> tz_vmm]   r7         = 00000001 [00000000]
> [init -> tz_vmm]   r8         = c088cf50 [8088cf50]
> [init -> tz_vmm]   r9         = 00000000 [00000000]
> [init -> tz_vmm]   r10        = 00000001 [00000000]
> [init -> tz_vmm]   r11        = c5b5b0c0 [85b5b0c0]
> [init -> tz_vmm]   r12        = 00002000 [00000000]
> [init -> tz_vmm]   sp         = 00000000 [00000000]
> [init -> tz_vmm]   lr         = 00000000 [00000000]
> [init -> tz_vmm]   ip         = c0309288 [80309288]
> [init -> tz_vmm]   cpsr       = 20000013
> [init -> tz_vmm]   sp_und     = c08e3978 [808e3978]
> [init -> tz_vmm]   lr_und     = c08e3978 [808e3978]
> [init -> tz_vmm]   spsr_und   = 00000000 [00000000]
> [init -> tz_vmm]   sp_svc     = c5023ee8 [85023ee8]
> [init -> tz_vmm]   lr_svc     = c030afd0 [8030afd0]
> [init -> tz_vmm]   spsr_svc   = 60000013 [00000000]
> [init -> tz_vmm]   sp_abt     = c08e396c [808e396c]
> [init -> tz_vmm]   lr_abt     = c0038a20 [80038a20]
> [init -> tz_vmm]   spsr_abt   = 20000093 [00000000]
> [init -> tz_vmm]   sp_irq     = c08e3960 [808e3960]
> [init -> tz_vmm]   lr_irq     = c0038a80 [80038a80]
> [init -> tz_vmm]   spsr_irq   = 60000093 [00000000]
> [init -> tz_vmm]   sp_fiq     = 00000000 [00000000]
> [init -> tz_vmm]   lr_fiq     = 00000000 [00000000]
> [init -> tz_vmm]   spsr_fiq   = 00000000 [00000000]
> [init -> tz_vmm]   ttbr0      = 85e34019
> [init -> tz_vmm]   ttbr1      = 80004019
> [init -> tz_vmm]   ttbrc      = 00000000
> [init -> tz_vmm]   dfar       = c690e02c [5000402c]
> [init -> tz_vmm]   exception  = data_abort
> [init -> tz_vmm] Could not handle data-abort will exit!

As you configured your ESDHC secure, unsecure Linux consequently isn't
allowed anymore to access it. If you want to let both Linux and Genode
access the ESDHC you can use an SMC-based stub block driver in the
unsecure world. You might have a look at [1] (unsecure sided driver) and
[2] (secure sided back-end) as an inspiration. In this example, Genode
secures the ESDHC in general but, via part_blk and tz_vmm, provides the
second partition of an ESDHC medium to the Linux stub block driver.

Cheers,
Martin

[1]
https://github.com/m-stein/genode/commit/225f1fe1296da11b8304ebe55a4c23f6e29f9aa5

 repos/os/src/server/tz_vmm/include/block.h
 repos/os/src/server/tz_vmm/block.cc

[2]
https://github.com/m-stein/linux/commit/9418cc87ed26b6cd7c4ec66ba4bdc1f998cd5ccd

 drivers/block/genode.c




More information about the users mailing list