Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH v2] linux-gen: sysinfo: recognize armv9 ISA #1928

Merged
merged 3 commits into from
Oct 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions platform/linux-generic/arch/aarch64/odp_sysinfo_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ static void aarch64_impl_str(char *str, int maxlen, int implementer)
case 0x44:
snprintf(str, maxlen, "Digital Equipment Corporation");
return;
case 0x46:
snprintf(str, maxlen, "Fujitsu Ltd.");
return;
case 0x49:
snprintf(str, maxlen, "Infineon Technologies AG");
return;
Expand All @@ -53,6 +56,9 @@ static void aarch64_impl_str(char *str, int maxlen, int implementer)
case 0x69:
snprintf(str, maxlen, "Intel Corporation");
return;
case 0xc0:
snprintf(str, maxlen, "Ampere Computing");
return;
default:
break;
}
Expand Down Expand Up @@ -132,6 +138,10 @@ static void aarch64_part_info(char *str, int maxlen, odp_cpu_arch_arm_t *cpu_isa
snprintf(str, maxlen, "Cortex-A78AE");
*cpu_isa = ODP_CPU_ARCH_ARMV8_2;
return;
case 0xd44:
snprintf(str, maxlen, "Cortex-X1");
*cpu_isa = ODP_CPU_ARCH_ARMV8_2;
return;
case 0xd46:
snprintf(str, maxlen, "Cortex-A510");
*cpu_isa = ODP_CPU_ARCH_ARMV9_0;
Expand All @@ -140,6 +150,10 @@ static void aarch64_part_info(char *str, int maxlen, odp_cpu_arch_arm_t *cpu_isa
snprintf(str, maxlen, "Cortex-A710");
*cpu_isa = ODP_CPU_ARCH_ARMV9_0;
return;
case 0xd48:
snprintf(str, maxlen, "Cortex-X2");
*cpu_isa = ODP_CPU_ARCH_ARMV9_0;
return;
case 0xd49:
snprintf(str, maxlen, "Neoverse N2");
*cpu_isa = ODP_CPU_ARCH_ARMV9_0;
Expand All @@ -152,6 +166,18 @@ static void aarch64_part_info(char *str, int maxlen, odp_cpu_arch_arm_t *cpu_isa
snprintf(str, maxlen, "Cortex-A78C");
*cpu_isa = ODP_CPU_ARCH_ARMV8_2;
return;
case 0xd4d:
snprintf(str, maxlen, "Cortex-A715");
*cpu_isa = ODP_CPU_ARCH_ARMV9_0;
return;
case 0xd80:
snprintf(str, maxlen, "Cortex-A520");
*cpu_isa = ODP_CPU_ARCH_ARMV9_2;
return;
case 0xd81:
snprintf(str, maxlen, "Cortex-A720");
*cpu_isa = ODP_CPU_ARCH_ARMV9_2;
return;
default:
break;
}
Expand Down Expand Up @@ -207,6 +233,11 @@ static odp_cpu_arch_arm_t arm_isa_version(void)
#endif
}

if (__ARM_ARCH == 9) {
/* v9.0 or higher */
return ODP_CPU_ARCH_ARMV9_0;
}

if (__ARM_ARCH >= 800) {
/* ACLE 2018 defines that from v8.1 onwards the value includes
* the minor version number: __ARM_ARCH = X * 100 + Y
Expand Down