Page 1 of 1
AArch64 tutorials
Posted: Wed Dec 04, 2013 12:50 pm
by ababo
Hi guys,
I plan to start a new iteration of my toy kernel development, fourth time rewriting from scratch all of my code. In order to improve portability I would prefer to support two different CPU platforms. My kernel design needs 64-bit CPU (all available persistent storage will be mapped into address space); now my code runs on x86_64. I start thinking about supporting of AArch64 (ARMv8, ARM64) also. Here comes my question.
Where can I find some tutorials about writing kernel level code for AArch64 which explain:
1. Necessary steps for obtaining/building/configuring all needed tools (compiler, emulator, ...).
2. First coding steps (getting started, minimal kernel, etc.).
Thanks in advance.
Re: AArch64 tutorials
Posted: Wed Dec 04, 2013 1:07 pm
by Owen
Considering the only ARMv8 chip in any volume production has a fruit logo on it... You'll find yourself to be out of look
Re: AArch64 tutorials
Posted: Wed Dec 04, 2013 1:11 pm
by bwat
Owen wrote:out of look
Scouse?
Re: AArch64 tutorials
Posted: Thu Dec 05, 2013 2:28 am
by Owen
Typing on a phone obviously uses enough of my mental faculties that I end up picking random homonyms occasionally
Re: AArch64 tutorials
Posted: Mon Jul 28, 2014 12:00 pm
by ababo
Six months after starting this topic we still have neither tutorials nor tools.
Re: AArch64 tutorials
Posted: Tue Jul 29, 2014 1:02 pm
by Owen
The only ways to get an AArch64 processor at present are:
- Purchase an ARM Juno board. These are very expensive and shipping in very limited quantities to ARM partners.
- Purchase a mobile device from Apple. Their chips remain the only devices shipping in volume.
ARM's Juno "demonstration and development" processors only taped out ~8 months ago. We are still waiting on people to start shipping chips (Altera's Stratix 10 FPGA SoCs might be some of the first devices to ship, with A53 cores. Do not expect them to be cheap - we are talking ~$500+ per chip here,
in volume).
AArch64 has been supported by Clang and GCC for a while. You can successfully build code today. ARM released their AArch64 emulator a few months ago; its' intended to run Linux, but you can use it to run your own code fine.
Expect chips to start shipping in production volumes towards the end of this year. Development board availability will probably be a while after that.
I have to question any kernel design which involves mapping all persistent storage into the process' address space. That only covers 280TB on both AArch64 and AMD64, which isn't a lot of storage in the grand scheme of things (or: my friend has nearly 32TB of storage in his
home server. That only takes 5 HDDs)
Note: Any statements with regards to time schedules of board and/or chip availability are my own predictions based upon publicly available information, and should not be construed as official information from my soon-to-be employer and/or their partners
Re: AArch64 tutorials
Posted: Wed Jul 30, 2014 4:16 am
by ababo
AArch64 has been supported by Clang and GCC for a while. You can successfully build code today. ARM released their AArch64 emulator a few months ago; its' intended to run Linux, but you can use it to run your own code fine.
Yes, I already have Aarch64 GCC compiler and tools (I think they come out of the box in Ubuntu 14.04) and qemu system emulator (built from Linaro sources). My problem is to do the first steps. I mean a simple tutorial which describes how to build a simplest Hello World binary and to run it on this emulator.
Re: AArch64 tutorials
Posted: Wed Jul 30, 2014 4:42 am
by Combuster
QEMU always emulates a certain piece of hardware. Graphics is not part of any specific ARM standard, so you either need to figure out which framebuffer device QEMU runs, or possibly a serial port.
But considering the lack of public hardware as mentioned, it might just be some developer sketch with random hardware, and you're best off scourging their territory for whatever test image the developer/maintainer in question used to test the thing so you have a working reference.
Re: AArch64 tutorials
Posted: Wed Jul 30, 2014 5:03 am
by ababo
QEMU always emulates a certain piece of hardware. Graphics is not part of any specific ARM standard, so you either need to figure out which framebuffer device QEMU runs, or possibly a serial port.
Yes, for now only serial port makes sense.
But considering the lack of public hardware as mentioned, it might just be some developer sketch with random hardware, and you're best off scourging their territory for whatever test image the developer/maintainer in question used to test the thing so you have a working reference.
Yes, this is a problem, but again, for now I need to write the most generic code like memory management, thread scheduling, etc, so this is not an issue yet.
I have to question any kernel design which involves mapping all persistent storage into the process' address space. That only covers 280TB on both AArch64 and AMD64, which isn't a lot of storage in the grand scheme of things (or: my friend has nearly 32TB of storage in his home server. That only takes 5 HDDs)
I believe future extensions/implementations will push this limit. For now + 5-10 years 48 bits will be quite enough for most of machines.