[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Basic bare metal ARM domain interface


> I used FreeRTOS code for console output. It is based on Mini OS code. There 
> are two problems as I've determined
> with debugging. First is that vsnprintf blocks for some reason in print 
> function so i commented it out. After the 

snprintf blocks...

> hypercall function blocked as well. I modified hypercall function so it looks 
> like this:
> (void)HYPERVISOR_console_io(CONSOLEIO_write, 3, "yes");

As the call failed I decided to make hypervisor call directly in boot 
procedure, so I put this assembler code just before
branch to main: 

        mov r12, #18 ; console io code
        mov r0, #0 ; write operation(first parameter)
        mov r1, #5 ; length of message (second parameter)
        ldr r2, =msg ; message address (third parameter)
        .long 0xe140ea71 ; hvc instruction
        b main ; branch to main

msg is defined as:

    .asciz "hello"

I get deadbeef in registers, apperently something happened (xenctx output):
PC:       4000c5bc
CPSR:     600001f3
USR:               SP:00000000 LR:00000000
SVC: SPSR:00000000 SP:4011c200 LR:400080a8
FIQ: SPSR:00000000 SP:40124200 LR:00000000
IRQ: SPSR:00000000 SP:40120200 LR:00000000
ABT: SPSR:00000000 SP:40128200 LR:00000000
UND: SPSR:00000000 SP:4012c200 LR:00000000

 r0_usr: 00000000        r1_usr: deadbeef        r2_usr: deadbeef
 r3_usr: 00000000        r4_usr: 00000000        r5_usr: 00000000
 r6_usr: 00000000        r7_usr: 00000000        r8_usr: 00000000
 r9_usr: 00000064       r10_usr: 00000064       r11_usr: 00000000
r12_usr: deadbeef

According to arch-arm.h r0 is return value of call. It is 0, operation 
successful???? Still I don't get output on 

Thank you in advance,


Ivan Pavic 


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.