All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ivan Pavić2" <Ivan.Pavic2@fer.hr>
To: Jonathan Daugherty <jtd@galois.com>,
	Julien Grall <julien.grall@arm.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: Adam Wick <awick@galois.com>
Subject: Re: Basic bare metal ARM domain interface
Date: Sat, 28 May 2016 11:21:58 +0000	[thread overview]
Message-ID: <65387702CB408A468385A8FFC6F5807C343624@POSTAR.fer.hr> (raw)
In-Reply-To: <20160527211650.GA43457@galois.com>

Hello, 

> 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:

msg:
    .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 
console...

Thank you in advance,

Regards,

Ivan Pavic 



 




_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-05-28 11:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-25 19:42 Basic bare metal ARM domain interface Ivan Pavić2
2016-05-27 10:04 ` Julien Grall
2016-05-27 13:19   ` Ivan Pavić2
     [not found]   ` <20160527211650.GA43457@galois.com>
2016-05-28 11:21     ` Ivan Pavić2 [this message]
2016-05-30 20:21       ` Odgovor: " Ivan Pavić2
2016-05-31  9:53         ` Julien Grall
2016-06-01 20:06           ` Ivan Pavic
2016-06-02 11:41             ` Julien Grall
2016-06-02 19:09               ` Ivan Pavic
2016-06-03 10:23                 ` Julien Grall
2016-06-06 23:31                   ` Ivan Pavic
2016-06-07 14:18                     ` Julien Grall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65387702CB408A468385A8FFC6F5807C343624@POSTAR.fer.hr \
    --to=ivan.pavic2@fer.hr \
    --cc=awick@galois.com \
    --cc=jtd@galois.com \
    --cc=julien.grall@arm.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.