qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] HelloWord kernel for qemu-system-aarch64


From: Christopher Covington
Subject: Re: [Qemu-devel] HelloWord kernel for qemu-system-aarch64
Date: Fri, 05 Sep 2014 14:27:09 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2

On 09/05/2014 01:52 PM, Semion Prihodko wrote:
> This is tricky to deepen in this large code base. It looks strange that
> there's no simple concrete tutorial like we have for all other CPU
> architectures (e.g. in osdev.org <http://osdev.org>).

AArch64 hasn't really changed the PL011 UART (nor GIC, nor VirtIO-MMIO, nor
semihosting, although maybe DCC a little) as far as I recall. The UART
functions from the following article are probably reusable.

http://wiki.osdev.org/ARM_Integrator-CP_IRQTimerAndPIC

Among other things, AArch64 is pretty new compared to the other architectures
on osdev.org. If you get something going, maybe you can write the tutorial.

Christopher

> 05 Сен 2014 г. 19:57 пользователь "Claudio Fontana"
> <address@hidden <mailto:address@hidden>> написал:
> 
>     On 05.09.2014 16 <tel:05.09.2014%2016>:50, Semion Prihodko wrote:
>     > Let's discard semihosting. I have aarch64-linux-gnu-* toolchain and
>     > qemu-system-aarch64 emulator. How can I build a minimal kernel which
>     > outputs Hello World! via serial port and run it on the emulator?
>     >
> 
>     If you run qemu with the "virt" platform, you can write to the UART at
>     0x9000000
>     to get a character out, works very early.
> 
>     You could check the AArch64 port of the OSv Operating System, has a simple
>     boot loader
>     you can look at (arch/aarch64/preboot.S and arch/aarch64/boot.S)
>     and the pl011 device you find in drivers/pl011.cc
> 
>     https://github.com/cloudius-systems/osv/wiki/AArch64
> 
>     Good luck,
> 
>     Claudio
> 
>     >
>     > 2014-09-04 21:15 GMT+03:00 Christopher Covington <address@hidden
>     <mailto:address@hidden>>:
>     >
>     >> Hi Semion,
>     >>
>     >> On 09/04/2014 09:40 AM, Semion Prihodko wrote:
>     >>> Still don't know how to build/run a simple Hello World kernel on
>     >>> qemu-system-aarch64?
>     >>>
>     >>> Guys, this is a very basic thing, please provide concrete steps. 
> Thanks.
>     >>
>     >> Here you go. Start at the wget.
>     >>
>     >> http://lists.gnu.org/archive/html/qemu-devel/2014-07/msg03487.html
>     >>
>     >> Angel semihosting isn't implemented upstream so a text hello world 
> won't be
>     >> trivial, although given enough time it should be possible to implement
>     >> Angel
>     >> semihosting for A64 in QEMU, implement DCC in QEMU and Newlib/libgloss 
> or
>     >> implement PL011 UART or VirtIO-MMIO console in Newlib/libgloss.
>     >>
>     >> Some of the bootloaders and firmwares out there (bootwrapper, ARM 
> trusted
>     >> firmware, UEFI/Tianocore) may have examples of using the PL011 UART.
>     >>
>     >> Christopher
>     >>
>     >> --
>     >> Employee of Qualcomm Innovation Center, Inc.
>     >> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
>     >> hosted by the Linux Foundation.
>     >>
> 


-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by the Linux Foundation.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]