From: Julien Grall <julien.grall@arm.com>
To: "Ivan Pavić2" <Ivan.Pavic2@fer.hr>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: jtd@galois.com
Subject: Re: Basic bare metal ARM domain interface
Date: Fri, 27 May 2016 11:04:50 +0100 [thread overview]
Message-ID: <57481BC2.9030804@arm.com> (raw)
In-Reply-To: <65387702CB408A468385A8FFC6F5807C342E87@POSTAR.fer.hr>
On 25/05/16 20:42, Ivan Pavić2 wrote:
> Hello,
Hello Ivan,
> I'm working on bare metal application for ARM Cortex A7/15 on Odroid XU3
> platform. I'm using Xen 4.6.
>
> After successfully creating bare metal example(by successful I mean I've stuck
> processor in while loop in main function), I probably should initialize memory
> management unit and similiar. I've found FreeRTOS project on Github where
> similiar stuff was done for ARM Cortex A15. Project is done for Xen 4.4.
> Xen FreeRTOS project: https://github.com/GaloisInc/FreeRTOS-Xen/ .
>
> 1) I'm using 4.6. so I don't know if code from is fully compatible? (I had to
> comment out lot of things because they block program, printing for example)
If I remember correctly, FreeRTOS is not using the device-tree to find
where reside the GIC MMIO regions (and possible other MMIOs).
The memory layout has been reworked between Xen 4.4 and Xen 4.5. So you
will need to update the base address hardcoded in FreeRTOS.
I have CCed, Jonathan who did the FreeRTOS port for Xen. He will be able
to give you more details about it.
>
> 2) Additionally , I would like to implement basic serial output to dom0 from my
> bare metal domU. What is the minimum one should do for implementing console
> output?
We provide a PV console interface. The backend is already implement in
dom0 (assuming you are using Linux). For the frontend, you can give a
look, how mini-os [1] has implemented it.
>
> 3) Furthermore, as this should be bare metal application, I would like at least
> to be able to toggle LED. How can interface hardware from domU? My first guess
> would be to directly address Exynos 5422 GPIO registers but I don't know if
> that would work beacause application is running on VCPU (probably not??) ??
By default, the guest has no access to the hardware. You will need to
specify in the configure file the list of MMIO regions the guest is
allowed to access. You can find more details about it here [2].
>
> Any answer, example of implementation, specific documentation or advice would
> be very helpful.
There were a few talks to explain how to port an OS on XEN:
-
https://events.linuxfoundation.org/sites/events/files/slides/FreeRTOSXenSummit_0.pdf
- http://fr.slideshare.net/xen_com_mgr/bsdcan-2015-how-to-port-your-bsd
I hope this will help you to create your bare metal app. Feel free to
send an e-email if you have more questions.
Regards,
[1]
http://xenbits.xen.org/gitweb/?p=mini-os.git;a=tree;f=console;h=61f51490a1aefc15148b6e1f016d9e63bbfe61aa;hb=HEAD
[2] https://events.linuxfoundation.org/sites/events/files/slides/talk_5.pdf
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-05-27 10:04 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 [this message]
2016-05-27 13:19 ` Ivan Pavić2
[not found] ` <20160527211650.GA43457@galois.com>
2016-05-28 11:21 ` Ivan Pavić2
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=57481BC2.9030804@arm.com \
--to=julien.grall@arm.com \
--cc=Ivan.Pavic2@fer.hr \
--cc=jtd@galois.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).