Disambiguating Arm, Arm ARM, ARMv9, ARM9, ARM64, AArch64, A64, A78, ...
nickdesaulniers.github.io
nickdesaulniers.github.io
...and so does Microsoft with its ARM64EC ABI:
https://learn.microsoft.com/en-us/cpp/build/arm64ec-windows-...
I've always thought it odd that a CPU manufacturer would specify an ABI, since that seems to imply preference towards certain programming languages and techniques which may or may not be ideal in all cases; Intel certainly didn't.
There are two ABIs in common use on 64-bit x86. One is used on windows; the other is used everywhere else, and intel has been involved in its specification (I believe its current editor is an intel employee).
Most concerns relating to ABI specification can be dealt with pursuant only to architecture, not microarchitecture; minimising instruction or byte counts, say. And architectures have long lives, over the course of which microarchitectures may change quite a lot. You wouldn't want your ABI to be overfit to one particular microarchitecture.
Not to say that it's a bad thing for a processor or architecture vendor to supply a standard ABI. It's good to have cohesion and consistency, and furthermore, if you have designed an architecture, then you have (one really, really hopes) performed a lot of experiments to see what code for that architecture looks like, so you are in a good position to be specifying an ABI. But that's not to say a third party is per se in a worse position to be specifying an ABI.
And of course, stable binary interfaces are dying (and good riddance!), but that's a separate issue.
Why?
It we all agree to use R13 as SP, the core designers can spend a few [hundred] extra transistors optimizing accesses to [R13 + offset]. Perhaps adding such logic for ALL registers is too costly?
If we all agree that R14 is the return address, the prefetcher might want to prefetch instructions there, so return is faster. The core probably cannot afford the transistors to do that for ALL regs
ARM (and most other chips) will work if you do not follow those conventions, but they might not perform as well.
Eg: aarch64 instruction "ret" takes a register param and you can use any reg you wish, but at least on some microarchitectures implementing the aarch64 ISA, it will be faster if the param is the X30 register, since that is the agreed-upon return address reg, and some silicon was spent optimizing this case
It's odd because ARM seems to be trying to present itself as being a RISC, when the architecture appears to be slowly becoming something else. The allowable addressing modes with each instruction in A64 clearly shows this.
But in modern very-OoO cpus, you are right, and having SP and PC be GPRs is of little use and of non-negilible cost design-wise, which is why in aarch64, SP and PC are special and not GPRs like they were in ARMv7 and below. LR still is a GPR though
And yes, there's an implicit bias towards C and C++ here, but that is just because that is the environment where enough toolchain developers and customers care about interoperability between different suppliers to make specification worthwhile.
The Alpine packages are “armhf” and the last 2 letters I think mean it has hardware floating point support.
The kernel is armv6l and I still don’t know what the last letter is for.
Cross-compiling for it can be annoying, but I seem to be able to pass the CPU name directly (I don’t remember it off-hand, but it’s more easily Google-able) to get things to build properly.
I don’t really have a point, just venting…
But why? That’s ancient! I’ve got a few different models of Pi’s laying around and even the 3B+ ones feel old at this point!
The oldest one that I have is surely an RPi 1 Model B as well! Because it has dual USB ports and no more USB than that. Haven’t used this one for ages tho, but still have it sitting on my desk here.
Edit: Specifically, after looking at some more images and details online, the oldest mentioned Pi that I have in my possession seems to be a Raspberry Pi 1 Model B Rev 2.1 (UK) model.
And meanwhile I have a couple old PowerPC macs that I plan to put to use, which may at this point be slower even than the RPi 1 B I have and am not using :p
ARM is bi-endian. I'm pretty sure the 'l' means the kernel was compiled to be little-endian.
> elf32-littlearm, and elf32-bigarm
Keep an eye out for the follow up then.
For the record, I was complaining about the diversity of ARM targets (as viewed by someone who wants to have to know as little about it as possible, while still getting things to work), and not about your article!
As for "armhf" it is a description of the the ABI, and the "hf" means what you said, that the hardware supports floating point operations. I'm slightly confused as to how armhf could work on the ARM11 on the Pi 1 and Zero generations, as AFAICR it targeted v7 onwards.
https://wiki.debian.org/RaspberryPi#Raspberry_Pi_OS_.28forme...
Sometimes I think they work against humanity.
A more cynical take would be to wonder if it has anything to do with their steps trying to monetize Docker Desktop. This move puts the same stack in use with Linux, maybe giving them monetization on Linux as well. (Not that there’s anything wrong with that. You can still use the Docker Engine freely on Linux if you want. )
[1] https://docs.docker.com/desktop/faqs/linuxfaqs/#why-does-doc...
Docker _Desktop_ is an indirection tool, a glorified network stitcher, that runs VMs to make it appear like you are running Docker on other systems (Win/Mac). Docker _Desktop_ installs a VM by default, likely in a bid for consistency across platforms.
On Linux you should not be installing Docker Desktop, only Docker Engine.
To fit into the ecosystem, Windows has traditionally exposed them via Docker CLI endpoints.
This is changing now with kubernetes moving away from Docker as dependency, and other tooling is becoming available to manage Windows containers.
I know Windows has WSL and Docker Desktop, but they both run a Linux kernel in a hardware accelerated virtual machine. I wouldn't call that native.
In the case of Windows containers, WSL is only there to keep Docker management tools happy, and for Linux containers
Windows containers infrastructure is based on Windows Jobs, and they are exclusive, either you run Docker in Linux mode, or you run it talking to Windows containers and this is on way out since containerd no longer needs it.
https://learn.microsoft.com/en-us/virtualization/windowscont...
https://learn.microsoft.com/en-us/virtualization/windowscont...
Btw in updating a Docker image to support multi-arch, I sometimes had to download binaries named with arm64 in the name, and sometimes with aarch64 in the name. But the previous version had the same issue with amd64 vs x86_64, so it's not a new issue.
For your perusal. :)
https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/ARM-Options.ht...
https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/AArch64-Option...
Slightly tangential, but can people recommend a good site for finding hardware available to purchase for specific ARM versions? In particular, when hardware implementing a new ARM version (e.g. 8.5 or 9) becomes available, where should I be keeping an eye on?
Alternatively, what manufacturers are usually the first to produce new ARM hardware?
If you want to find a consumer device which implements a specific arch, you can take the list of SOCs from above, and select them in "Chipset" in GSMArena's search: https://www.gsmarena.com/search.php3?
When such OSes run a 64-bit program, they are in 64-bit execution state and when they run a 32-bit program, in 32-bit execution state. Basically, the processor switches execution state depending on what is being run, and in a way "emulates" a 32-bit processor by restricting registers and so on to be compatible with the 32-bit arch.
Non-Secure EL0 is user space, with limited access to system registers.
Non-Secure EL1 is kernel space with more access to system registers.
Non-Secure EL2 is hypervisor space with more access to system registers.
EL3 is the secure monitor.
I'm not sure what the secure states ELs can do, or if they have the same 3 ELs available as the non-secure side. Likely not. I've never used them, but I think the secure state is described as though intended for a set of micro-services that the Non-Secure levels can send requests to.There are extensions allowing Hypervisor EL2 to be a Secure state. A secure hypervisor may be able to manage secure and non-secure kernels.
Arm allow various levels to not be implemented, supporting weird combos, like EL2 and EL0, without an EL1.
The current state can also control what you're allowed to do with peripherals, like the interrupt controller. Even if provided access to the GIC's full register set, code running in a non-secure state cannot reconfigure or induce a secure interrupt. Any such requests will be ignored. Secure and non-secure accesses to memory may read from entirely different RAM chips.
...The execution state gets kinda complicated.
> There are extensions allowing Hypervisor EL2 to be a Secure state. A secure hypervisor may be able to manage secure and non-secure kernels.
So the extension isn't to allow a normal EL2 access to secure state, but instead to run a hypervisor to allow several SEL1 secure OSs. It wouldn't be weird to run one hypervisor in SEL2 and another in EL2 with SEL2 multiplexing a few trusted OSs and EL2 multiplexing several OSs as a standard heypervisor. Both would run on top of the EL3 monitor.
Check the parent's username.
https://en.wikichip.org/wiki/arm/26-bit_architectures
https://en.wikipedia.org/wiki/26-bit_computing
Flags, processor mode, and the PC (24-bit) were kept in the same 32-bit word. That made it cheaper to store/restore on interrupt and, boy, did they want interrupt handling to be fast!
Combined with the requirement for naturally aligned instructions, this gives the original ARM a 26-bit address space for code. They chose to make that the address space for everything -- so the address space was 64MB.
The ARM926 came much later.
Technical writing is hard.
https://github.com/dotnet/runtime/commit/1f4835129630f12008d...