[Top][All Lists]

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


From: Sergey Bugaev
Subject: [PATCH 1/9] Add CPU_TYPE_ARM64
Date: Mon, 15 Apr 2024 12:01:41 +0300

This is distinct from CPU_TYPE_ARM, since we're going to exclusively use
AArch64 / A64, which CPU_TYPE_ARM was never meant to support, and to
match EM_AARCH64, which is also separate from EM_ARM.  CPU_TYPE_X86_64
was similarly made distinct from CPU_TYPE_I386.

This is named CPU_TYPE_ARM64 rather than CPU_TYPE_AARCH64, since AArch64
is an "execution state" (analogous to long mode on x86_64) rather than a
CPU type.  "ARM64" here is not a name of the architecture, but simply
means an ARM CPU that is capable of (and for our case, will only really
be) running in the 64-bit mode (AArch64).

There are no subtypes defined, and none are expected to be defined in
the future.  Support for individual features/extensions should be
discovered by other means, i.e. the aarch64_get_hwcaps() RPC.
 include/mach/machine.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/mach/machine.h b/include/mach/machine.h
index 9a176e8c..072bf539 100644
--- a/include/mach/machine.h
+++ b/include/mach/machine.h
@@ -110,6 +110,7 @@ extern struct machine_slot  machine_slot[NCPUS];
 #define CPU_TYPE_PENTIUMPRO    ((cpu_type_t) 19)
 #define CPU_TYPE_POWERPC       ((cpu_type_t) 20)
 #define CPU_TYPE_X86_64                ((cpu_type_t) 21)
+#define CPU_TYPE_ARM64         ((cpu_type_t) 22)       /* AArch64-capable ARM 
  *     Machine subtypes (these are defined here, instead of in a machine

reply via email to

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