tz_vmm demo on imx53qsb

Joseph Lee leejose911 at ...9...
Tue Jan 5 23:34:12 CET 2016


Hi Stefan,

Thanks a lot for your explanation.

when i reset the GPU to be unsecure in csu.h file, it displays the attached
output and gets stuck again. I assume a user prompt will appear in the end
to execute Linux commands. is that right? what does  "sh: can't access tty;
job control turned off" error mean?

Thanks,

On Tue, Jan 5, 2016 at 8:47 AM, Stefan Kalkowski <
stefan.kalkowski at ...1...> wrote:

> Hi Joseph,
>
> On 01/05/2016 01:49 AM, Joseph Lee wrote:
> > Hello everyone,
> >
> > I have built and run the current Genode version(15.11) with trustzone for
> > hw_imx53_qsb_tz platform but i used the initramfs (initrd.gz) for Android
> > image that are used in the demo for Sabre tablet (
> >
> https://github.com/skalk/genode/blob/i.MX53_tablet_demo/os/src/server/vmm/imx53/README
> ).
>
> That is right, one has to distinguish between Sabre Tablet and
> Quickstart Board on different levels including the Android images. There
> might be more surprises when porting the existent demo to the Quickstart
> board.
>
> > After some trials and errors, I have managed to get the following outputs
> > (see attached) on the serial console and it got stuck. is this the right
> > approach to run Android in the normal world of i.mx53 QSB?  What is
> missing
> > ? lvds display is connected to the board but nothing is displayed.
>
> When looking at the attached output I cannot see any initialization of
> drivers (e.g.: the framebuffer driver). It looks to me as if you are
> using the current 'tz_vmm' run-script that is used for automated testing
> only without any graphical setup. Is that right?
> As an alternative, you might use the run script from the tablet demo as
> a starting point:
>
>
>
> https://raw.githubusercontent.com/skalk/genode/i.MX53_tablet_demo/os/run/vmm.run
>
> But again, you must brace yourself for surprises, because the run-script
> is pretty much outdated and was created for a very specific setup on top
> of the SABRE tablet.
>
> Apart from that, the output really looks good, but in the end your
> Android VM faults when trying to access the GPU (data-abort at physical
> address 0x30001740). That is because the GPU is set as secure within the
> kernel device initialization (more precisely the Central Security Unit
> initialization) in file:
> repos/base-hw/src/core/include/spec/imx53/trustzone/csu.h
>
> The GPU is set as secure like the "Image Processing Unit" (framebuffer
> device), because we enabled the DMA channel of the framebuffer driver to
> access secure memory, as it is driven by Genode's framebuffer driver
> that runs within the secure world. Sadly the GPU device uses the same
> DMA channel ID, and thereby the GPU is allowed to access secure memory
> via DMA too. Therefore, we set the GPU to be used by the secure world only.
>
> If you want to use the GPU within the normal world (Android) for
> demonstration purposes only, and do not matter about DMA device attacks,
> you can also re-set the GPU to be unsecure (search for GPU 2D and 3D in
> the csu.h file).
>
> Regards
> Stefan
>
> >
> > Thanks,
> >
> > On Mon, Dec 28, 2015 at 4:48 AM, Joseph Lee <leejose911 at ...9...>
> wrote:
> >
> >> Hi everyone,
> >>
> >> i am currently trying to run trustzone demo on imx53 Quick Start Board
> >> (qsb). In which i want to run Android OS in the normal world. i followed
> >> the instruction in this link (
> >>
> https://github.com/skalk/genode/blob/i.MX53_tablet_demo/os/src/server/vmm/imx53/README
> )
> >> and built the uImage successfully. I put the uImage on the SD card
> >> partition (/dev/mmcblk0p1). However, when try to boot the uImage, it
> gets
> >> stuck after displaying the following outputs. I have attached the whole
> log
> >> messages. FYI, the SD card has two partitions(/dev/mmcblk0p1 and
> >> /dev/mmcblk0p2) with ext4 format.
> >>
> >> mmc0: new high speed SDHC card at address 0007
> >> mmcblk0: mmc0:0007 SD32G 28.9 GiB
> >>  mmcblk0: p1 p2
> >> init: cannot open '/initlogo.rle'
> >> EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts:
> >> (null)
> >> EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
> >> init: Unable to open persistent property directory /data/property
> errno: 2
> >> init: cannot find '/system/bin/sh', disabling 'console'
> >> init: cannot find '/system/bin/servicemanager', disabling
> 'servicemanager'
> >> init: cannot find '/system/bin/vold', disabling 'vold'
> >> init: cannot find '/system/bin/netd', disabling 'netd'
> >> init: cannot find '/system/bin/dispd', disabling 'dispd'
> >> init: cannot find '/system/bin/debuggerd', disabling 'debuggerd'
> >> init: cannot find '/system/bin/app_process', disabling 'zygote'
> >> init: cannot find '/system/bin/mediaserver', disabling 'media'
> >> init: cannot find '/system/bin/dbus-daemon', disabling 'dbus'
> >> init: cannot find '/system/bin/installd', disabling 'installd'
> >> init: cannot find '/system/etc/install-recovery.sh', disabling
> >> 'flash_recovery'
> >> init: cannot find '/system/bin/keystore', disabling 'keystore'
> >> init: cannot find '/system/bin/rild', disabling 'ril-daemon'
> >> init: cannot find '/system/bin/magd', disabling 'magd'
> >> init: cannot find '/system/bin/wlan_tool', disabling 'wlan_tool'
> >>
> >> could you please let me know what is missing?
> >>
> >> thank you!
> >>
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> >
> >
> >
> > _______________________________________________
> > genode-main mailing list
> > genode-main at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/genode-main
> >
>
> --
> Stefan Kalkowski
> Genode Labs
>
> http://www.genode-labs.com/ ยท http://genode.org/
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> genode-main mailing list
> genode-main at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genode.org/pipermail/users/attachments/20160105/bee02e35/attachment.html>
-------------- next part --------------
U-Boot 2015.10-dirty (Dec 21 2015 - 00:07:05 +0100)

Board: MX53 LOCO
I2C:   ready
DRAM:  1 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   FEC
Hit any key to stop autoboot:  0 
=> ext2load mmc 0:1 71000000 /uImage
5050432 bytes read in 316 ms (15.2 MiB/s)
=> bootm 71000000
## Booting kernel from Legacy Image at 71000000 ...
   Image Name:   
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5050368 Bytes = 4.8 MiB
   Load Address: 70010000
   Entry Point:  70010000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

kernel initialized
Genode 15.11
int main(): --- create local services ---
int main(): --- start init ---
int main(): transferred 246 MB to init
int main(): --- init created, waiting for exit condition ---
[init] Could not open ROM session for module "ld.lib.so"
[init] parent provides
[init]   service "ROM"
[init]   service "RAM"
[init]   service "IRQ"
[init]   service "IO_MEM"
[init]   service "IO_PORT"
[init]   service "CAP"
[init]   service "PD"
[init]   service "RM"
[init]   service "CPU"
[init]   service "LOG"
[init]   service "SIGNAL"
[init]   service "VM"
[init] child "tz_vmm"
[init]   RAM quota:  10203136
[init]   ELF binary: tz_vmm
[init]   priority:   0
[init -> tz_vmm] Start virtual machine ...
Initializing cgroup subsys cpu
Linux version 2.6.35.3-01270-g9533414 (kalle at me) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #843 PREEMPT Wed Nov 27 14:43:11 CET 2013
CPU: ARMv7 Processor [412fc085] revision 5 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: Freescale MX53 LOCO Board
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 24384
Kernel command line: console=ttymxc0,115200
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
allocated 491520 bytes of page_cgroup
please try 'cgroup_disable=memory' option if you don't want memory cgroups
Memory: 96MB = 96MB total
Memory: 87016k/87016k available, 11288k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xfde00000 - 0xffe00000   (  32 MB)
    vmalloc : 0xc6800000 - 0xf4000000   ( 728 MB)
    lowmem  : 0xc0000000 - 0xc6000000   (  96 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .init : 0xc0008000 - 0xc0038000   ( 192 kB)
      .text : 0xc0038000 - 0xc0866000   (8376 kB)
      .data : 0xc0888000 - 0xc08e7640   ( 382 kB)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
	RCU-based detection of stalled CPUs is disabled.
	Verbose stalled-CPUs detection is disabled.
NR_IRQS:368
MXC GPIO hardware
MXC IRQ initialized
MXC_Early serial console at MMIO 0x53fbc000 (options '115200')
bootconsole [ttymxc0] enabled
Console: colour dummy device 80x30
Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
pid_max: default: 32768 minimum: 301
Security Framework initialized
Mount-cache hash table entries: 512
Initializing cgroup subsys debug
Initializing cgroup subsys ns
Initializing cgroup subsys cpuacct
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys blkio
CPU: Testing write buffer coherency: ok
regulator: core version 0.5
NET: Registered protocol family 16
i.MX IRAM pool: 128 KB at 0xc6840000
FAILED TO RELEASE IRAM PARTITION
CPU is i.MX0 Revision 0.0
Using SDMA I.API
MXC DMA API initialized
IMX usb wakeup probe
IMX usb wakeup probe
bio: create slab <bio-0> at 0
SCSI subsystem initialized
Freescale USB OTG Driver loaded, $Revision: 1.55 $

****************************** NOTICE *****************************
You have seen this notice as you have enabled OTG driver for mx53 LOCO board
For mx53 loco board, the OTG function is unavailable due to hardware limitation
So, Only one usb function (device or host) can be available for certain image
Please config your kernel to disable OTG and the usb function you don't want to use
And remain the other usb function you would like to use

Below OTG configs should be removed:
CONFIG_MXC_OTG, CONFIG_USB_OTG

Choose one of below configs for host or device function
But DO NOT choose them together

OTG host config
CONFIG_USB_EHCI_ARC_OTG

OTG device config
CONFIG_USB_GADGET

usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
da9052_ssc_i2c 0-0048: 2 - da9052_i2c_read:master_xfer Failed!!
da9052_i2c_is_connected - i2c read failed.....
da9052_ssc_i2c 0-0048: 2 - da9052_i2c_read:master_xfer Failed!!
da9052_i2c_is_connected - i2c read failed.....
da9052_ssc_i2c 0-0048: 2 - da9052_i2c_read:master_xfer Failed!!
da9052_i2c_is_connected - i2c read failed.....
da9052_ssc_i2c 0-0048: 2 - da9052_i2c_read:master_xfer Failed!!
da9052_i2c_is_connected - i2c read failed.....
da9052_ssc_i2c 0-0048: 2 - da9052_i2c_read:master_xfer Failed!!
da9052_i2c_is_connected - i2c read failed.....
da9052_ssc_i2c 0-0048: 2 - da9052_i2c_read:master_xfer Failed!!
da9052_i2c_is_connected - i2c read failed.....
da9052_ssc_i2c 0-0048: 2 - da9052_i2c_read:master_xfer Failed!!
da9052_i2c_is_connected - i2c read failed.....
da9052_ssc_i2c 0-0048: 2 - da9052_i2c_read:master_xfer Failed!!
da9052_i2c_is_connected - i2c read failed.....
da9052_ssc_i2c 0-0048: 2 - da9052_i2c_read:master_xfer Failed!!
da9052_i2c_is_connected - i2c read failed.....
da9052_ssc_i2c 0-0048: 2 - da9052_i2c_read:master_xfer Failed!!
da9052_i2c_is_connected - i2c read failed.....
da9052_ssc_i2c 0-0048: 2 - da9052_i2c_read:master_xfer Failed!!
da9052_i2c_is_connected - i2c read failed.....
Advanced Linux Sound Architecture Driver Version 1.0.23.
Bluetooth: Core ver 2.15
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Switching to clocksource mxc_timer1
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Unpacking initramfs...
Freeing initrd memory: 180K
LPMode driver module loaded
sdram autogating driver module loaded
Bus freq driver module loaded
DI1 is primary
mxc_dvfs_core_probe
mxc_dvfs_core_probe: failed to get gp regulator
DVFS driver module loaded
i.MXC CPU frequency driver
mxc_cpufreq_driver_init: failed to get gp regulator
DVFS PER driver module loaded
ashmem: initialized
msgmni has been set to 170
alg: No test for stdrng (krng)
cryptodev: driver loaded.
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
By setting, SII driver will not be enabled
mxcfb_probe: no remap
mxcfb_probe: no remap
mxcfb_probe: no remap
Serial: MXC Internal UART driver
mxcintuart.0: ttymxc0 at MMIO 0x53fbc000 (irq = 31) is a Freescale i.MX
console [ttymxc0] enabled, bootconsole disabled
console [ttymxc0] enabled, bootconsole disabled
mxcintuart.1: ttymxc1 at MMIO 0x53fc0000 (irq = 32) is a Freescale i.MX
mxcintuart.2: ttymxc2 at MMIO 0x5000c000 (irq = 33) is a Freescale i.MX
mxcintuart.3: ttymxc3 at MMIO 0x53ff0000 (irq = 13) is a Freescale i.MX
mxcintuart.4: ttymxc4 at MMIO 0x63f90000 (irq = 86) is a Freescale i.MX
loop: module loaded
pmem_adsp: 0 init
pmem_gpu: 1 init
MXC MTD nand Driver 3.0
i.MX GPMI NFC
vcan: Virtual CAN interface driver
Freescale FlexCAN Driver 
FEC Ethernet Driver
fec_enet_mii_bus: probed
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk at qualcomm.com>
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1
fsl-ehci fsl-ehci.0: irq 18, io base 0x53f80000
fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
fsl-ehci fsl-ehci.1: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.1: new USB bus registered, assigned bus number 2
fsl-ehci fsl-ehci.1: irq 14, io base 0x53f80200
fsl-ehci fsl-ehci.1: USB 2.0 started, EHCI 1.00
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
usbcore: registered new interface driver cdc_acm
cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbserial
usbserial: USB Serial Driver core
USB Serial support registered for GSM modem (1-port)
usbcore: registered new interface driver option
option: v0.7.2:USB Driver for GSM modems
ARC USBOTG Device Controller driver (1 August 2005)
Android usb driver initialize
android_usb gadget: android_usb ready
fsl-usb2-udc: bind to driver android_usb 
android gadget: register function adb
android gadget: register function usb_mass_storage
android gadget: register function rndis
rndis_function_bind_config MAC: 00:00:00:00:00:00
android_usb gadget: using random self ethernet address
android_usb gadget: using random host ethernet address
usb0: MAC 76:80:d3:4b:17:4c
usb0: HOST MAC fa:43:76:27:1c:71
android_usb gadget: usb_mass_storage, version: 2009/09/11
android_usb gadget: Number of LUNs=3
 lun0: LUN: removable file: (no medium)
 lun1: LUN: removable file: (no medium)
 lun2: LUN: removable file: (no medium)
f_accessory init
android gadget: register function accessory
mice: could not register psaux device, error: -16
mice: PS/2 mouse device common for all mice
input: gpio-keys as /devices/platform/gpio-keys/input/input0
MXC keypad loaded
input: eGalax Touch Screen as /devices/virtual/input/input1
input: FSL MPR121 Touchkey as /devices/virtual/input/input2
p1003_fwv33 2-0041: couldn't read panel infomation.
p1003_fwv33: probe of 2-0041 failed with error -5
using rtc device, mxc_rtc, for alarms
mxc_rtc mxc_rtc.0: rtc core: registered mxc_rtc as rtc0
i2c /dev entries driver
IR NEC protocol handler initialized
IR RC5(x) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
Linux video capture interface: v2.00
usbcore: registered new interface driver uvcvideo
USB Video Class driver (v0.1.0)
APM Battery Driver
MXC WatchDog Driver 2.0
MXC Watchdog # 0 Timer: initial timeout 60 sec
device-mapper: ioctl: 4.17.0-ioctl (2010-03-05) initialised: dm-devel at redhat.com
Bluetooth: Virtual HCI driver ver 1.3
Bluetooth: HCI UART driver ver 2.2
Bluetooth: HCIATH3K protocol initialized
Bluetooth: Generic Bluetooth USB driver ver 0.6
usbcore: registered new interface driver btusb
VPU initialized
mxc_asrc registered
gpu mmu disabled
mxsdhci: MXC Secure Digital Host Controller Interface driver
mxsdhci: MXC SDHCI Controller Driver. 
mmc0: SDHCI detect irq 0 irq 1 INTERNAL DMA
mxsdhci: MXC SDHCI Controller Driver. 
mmc1: SDHCI detect irq 203 irq 3 INTERNAL DMA
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
logger: created 64K log 'log_main'
logger: created 256K log 'log_events'
logger: created 64K log 'log_radio'
logger: created 64K log 'log_system'
Cirrus Logic CS42888 ALSA SoC Codec Driver
sgtl5000_hw_read: read reg error : Reg 0x00
Device with ID register 0 is not a SGTL5000
mxc_spdif mxc_spdif.0: MXC SPDIF Audio Transmitter
No device for codec mxc spdif
No device for DAI mxc spdif
No device for DAI imx-ssi-1-0
No device for DAI imx-ssi-1-1
No device for DAI imx-ssi-2-0
No device for DAI imx-ssi-2-1
No device for DAI imx-spdif-dai
DMA Sound Buffer Allocated: Playback UseIram=1 ext_ram=1 buf->addr=85a60000 buf->area=fe3e0000 size=24576
asoc: mxc spdif <-> imx-spdif-dai mapping ok
ALSA device list:
  #0: imx-3stack-spdif (mxc spdif)
nf_conntrack version 0.5.0 (1362 buckets, 5448 max)
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 10
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
can: controller area network core (rev 20090105 abi 8)
NET: Registered protocol family 29
can: raw protocol (rev 20090105)
can: broadcast manager protocol (rev 20090105 t)
Bluetooth: L2CAP ver 2.14
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO (Voice Link) ver 0.6
Bluetooth: SCO socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM ver 1.11
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Bluetooth: BNEP filters: protocol multicast
Bluetooth: HIDP (Human Interface Emulation) ver 1.2
L2TP core driver, V2.0
PPPoL2TP kernel driver, V2.0
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 2
mxc_rtc mxc_rtc.0: setting system clock to 1970-01-01 00:00:00 UTC (0)
Freeing init memory: 192K
mmc0: new high speed SDHC card at address 0007
mmcblk0: mmc0:0007 SD32G 28.9 GiB 
 mmcblk0: p1 p2 p3 < p5 p6 > p4
init: cannot open '/initlogo.rle'
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
EXT4-fs (mmcblk0p5): recovery complete
EXT4-fs (mmcblk0p5): mounted filesystem with ordered data mode. Opts: noauto_da_alloc
EXT4-fs (mmcblk0p6): recovery complete
EXT4-fs (mmcblk0p6): mounted filesystem with ordered data mode. Opts: (null)
init: cannot find '/system/etc/install-recovery.sh', disabling 'flash_recovery'
sh: can't access tty; job control turned off
# warning: `rild' uses 32-bit capabilities (legacy support in use)
spdif_set_sample_rate: no defined 44100 clk src
mxc_spdif_playback_prepare - err < 0
asoc: codec DAI prepare error
pmem: request for physical address of pmem region from process 2074.



More information about the users mailing list