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

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





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@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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