Sorry for the confusion. printf works fine. syscall 162 is actual SYS_nanosleep. I guess it is not implemented by sel4’s libmuslc yet.

Best Regards
-Daniel Wang



On Mar 8, 2018, at 11:53 PM, Daniel Wang <danielwang.ksu@gmail.com> wrote:

Hi all,

For experiment, I created a simple app along with the vmm using CamKES-ARM-VM repository. Currently the simple app only prints strings periodically using printf(). However as soon as the guest Linux starting running. I cannot print anything and also receives error as following:

I assumes it is due to the iommu capability got assigned to Linux by VMM. Is there a way to allow native app also prints information on the screen using printf()? 

------------------
libsel4muslcsys: Error attempting syscall 162
FAULT HANDLER: data fault from hello.control (ID 0x1) on address 0xffffff80, pc = 0x135ac, fsr = 0x3840046
FAULT HANDLER:      pc = 0x135ac
FAULT HANDLER:      sp = 0x142d20
FAULT HANDLER:      lr = 0x135ac
FAULT HANDLER:      r0 = 0xffffff80
FAULT HANDLER:      r1 = 0
FAULT HANDLER:      r2 = 0
FAULT HANDLER:      r3 = 0
FAULT HANDLER:      r4 = 0x26
FAULT HANDLER:      r5 = 0
FAULT HANDLER:      r6 = 0
FAULT HANDLER:      r7 = 0xfffffff2
FAULT HANDLER:      r8 = 0x1
FAULT HANDLER:      r9 = 0
FAULT HANDLER:     r10 = 0
FAULT HANDLER:     r12 = 0x142caa
FAULT HANDLER:     r14 = 0x135ac
FAULT HANDLER:    cpsr = 0x20000050
FAULT HANDLER:   memory map:
FAULT HANDLER:     +-- 0x00143fff --
FAULT HANDLER:     |   guard page
FAULT HANDLER:     +-- 0x00143000 --
FAULT HANDLER:     |   stack
FAULT HANDLER:     +-- 0x0013f000 --
FAULT HANDLER:     |   guard page
FAULT HANDLER:     +-- 0x0013e000 --
FAULT HANDLER:     |   <undescribed>
FAULT HANDLER:     +-- 0x00137fff --
FAULT HANDLER:     |   guard page
FAULT HANDLER:     +-- 0x00137000 --
FAULT HANDLER:     |   IPC buffer
FAULT HANDLER:     +-- 0x00136000 --
FAULT HANDLER:     |   guard page
FAULT HANDLER:     +-- 0x00135000 --
FAULT HANDLER:     |   <undescribed>
FAULT HANDLER:     +-- 0x00131fff --
FAULT HANDLER:     |   code and data
FAULT HANDLER:     +-- 0x00010000 --
CPIO: 2 files found.
0) linux                 0x00059c70, 16302080 bytes
1) linux-dtb             0x00fe5ce8,    29415 bytes

Best Regards
-Daniel Wang