32
submitted 2 months ago* (last edited 2 months ago) by ExtremeDullard@lemmy.sdf.org to c/linux@lemmy.ml

I'm about to step into the wonderful world of ARM Linux. I work with ARM32 as an embedded developer profesionally (Cortex-M3 specifically) so I'm not a complete newbie. But I've never used ARM64, and I've never used it with a desktop OS. So I'm doing my research, as one does, to know roughly what I'll be dealing with.

I have a few questions regarding backward compatibility and architecture-naming. Maybe you specialists out there could shed some light.

From what I could find, I understand the following:

  • arm64 and aarch64 are the same thing: the former is what Linus likes to say while the latter is what ARM calls their own stuff.
  • arm64 / aarch64 really mean "compatible with ARMv8" as a least common denominator, meaning ARMv8.x-y (x being the extension, y being A for application or R for realtime) will run it, just without taking advantage of any extension or realtime instructions.
  • ARMv9.x will run arm64 / aarch64 kernels and applications, as it's (supposedly) backward-compatible with ARMv8, just without taking advantage of the ARMv9 ISA.
  • If I want to create arm64 software that takes advantage of this-or-that extension or realtime instructions, I have to compile it in explicitely. I'm not sure if gcc handles special instructions, I haven't checked yet, but I suppose it does since it knows about the Thumb mode for instance.

Do I understand correctly?

If I do create some software that relies on extended ARMv8 or ARMv9 features and I want to release my software as a package, how should I name the package's architecture? Is there even a standard for that? Will it get rejected by the package managers of the few ARM distros out there, or will it be recognized as a subset of the wider arm64 / aarch64 architecture?

top 3 comments
sorted by: hot top controversial new old
[-] TCB13@lemmy.world 11 points 2 months ago

Yes, you did. "aarch64" and "arm64" are the same thing. AArch64 is the official name for the 64-bit ARM architecture, but some people prefer to call it "ARM64" as a continuation of 32-bit ARM that is also known as "armhf" and "armv7h".

[-] stsquad@lemmy.ml 5 points 2 months ago

Pretty much. From v8.0 onwards all the extra features are indicated by id flags. Stuff that is relevant to kernel mode will generally be automatically handled by the kernel patching itself on booting up and in user space some libraries will select appropriately accelerated functions when the ISA extensions are probed. There are a bunch off advisory instructions encoded in the hint space that will be effectively NOPs on older hardware but will enhance execution if run on newer hardware.

If you want to play with newer instructions have a look at QEMUs "max" CPU.

[-] ExtremeDullard@lemmy.sdf.org 1 points 2 months ago

Thanks!

libraries will select appropriately accelerated functions when the ISA extensions are probed.

Yeah okay, that sounds like how it's always been done. I don't know why I figured it would be any different with ARM. But that makes complete sense.

this post was submitted on 24 Aug 2024
32 points (97.1% liked)

Linux

47964 readers
1033 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS