This could be due to an IOMMU configuration issue.  Have you tried turning on the CONFIG_SMMU_INTERRUPT_ENABLE as well as CONFIG_PRINTING options in the seL4 kernel configuration? This will print out IOMMU faults that indicate the IOMMU isn't configured correctly.  


Kent.


From: li94575 <li94575@163.com>
Sent: Saturday, July 29, 2017 12:07 AM
To: Mcleod, Kent (Data61, Kensington NSW)
Cc: devel
Subject: Re: [seL4] Can I run Android on camkes-arm-vm with tk1 board?
 
Hi,
Recently I have  tried to start Linux310 in the VM according to the way you told. After giving the iomem in vm_common.camkes, most drivers of Linux310 can run well except the mmc driver. When the MMC driver initializes, I get an ADMA error  with errorcode 0x00000006. I don't know what went wrong, so I sent this email for help. The error log is showing below ( full log and dts file is in mail attachment ): 

[    8.798419] mmc0: ADMA error
[    8.801293] sdhci: =========== REGISTER DUMP (mmc0)===========
[    8.807119] sdhci: Sys addr: 0x00000000 | Version:  0x00000303
[    8.812944] sdhci: Blk size: 0x00007200 | Blk cnt:  0x00000000
[    8.818769] sdhci: Argument: 0x00000000 | Trn mode: 0x00000013
[    8.824593] sdhci: Present:  0x01fb02f6 | Host ctl: 0x00000011
[    8.830416] sdhci: Power:    0x0000000b | Blk gap:  0x00000000
[    8.836241] sdhci: Wake-up:  0x00000000 | Clock:    0x00000407
[    8.842065] sdhci: Timeout:  0x0000000e | Int stat: 0x00000001
[    8.848001] sdhci: Int enab: 0x02ff000b | Sig enab: 0x02fc000b
[    8.853826] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[    8.859649] sdhci: Caps:     0x376fd080 | Caps_1:   0x10002f77
[    8.865473] sdhci: Cmd:      0x0000083a | Max curr: 0x00000000
[    8.871293] sdhci: Host ctl2: 0x00003000
[    8.875211] sdhci: ADMA Err: 0x00000006 | ADMA Ptr: 0x80000000
[    8.881030] sdhci: ===========================================

I start the same Linux image without sel4, and that error does not appear.

At 2017-07-06 09:21:22, Kent.Mcleod@data61.csiro.au wrote:

Hi,


I cannot think of any reasons why Linux3.10 wouldn't also work other than making similar modifications that we made to Linux4.3.  The list of modifications that we made can be seen here: https://github.com/SEL4PROJ/linux-tegra/commits/sel4


If you wanted to try and add support for that version yourself, I would start by trying to build the current supported Linux version from source as described here: https://github.com/SEL4PROJ/camkes-arm-vm/blob/master/README.md 

Once you have that working, then change out the source version of Linux with the version you would like to use.  Then update the buildroot config to use the correct toolchains, kernel headers and source for the version you want.  

You will then need to make changes to the Linux source so that it can run in the different hardware environment the vmm presents to it.  This mostly relates to changes in the device tree layout file and anywhere in the sources where hardware values are hard coded.  I would start trying to get the primary debug uart working first which will then make it easier to debug what is happening as you try and get Linux to initialise.  


Hope this helps,


Kind regards,

Kent McLeod