From 5713d8d69aeb233488c9c52c0faf38fe1124c0e0 Mon Sep 17 00:00:00 2001 From: Matias Elo Date: Fri, 13 Oct 2023 15:28:58 +0300 Subject: [PATCH 1/4] api: sysinfo: add new ARMv8 and v9 enumerations Add enumerations for ARM ISA versions ARMv8.8-A, ARMv8.9-A, and ARMv9.3-A. Signed-off-by: Matias Elo Reviewed-by: Petri Savolainen Reviewed-by: Jerin Jacob --- include/odp/api/spec/system_info.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/odp/api/spec/system_info.h b/include/odp/api/spec/system_info.h index e3420ea8e1..98efe06f78 100644 --- a/include/odp/api/spec/system_info.h +++ b/include/odp/api/spec/system_info.h @@ -88,6 +88,12 @@ typedef enum odp_cpu_arch_arm_t { /** ARMv8.7-A ISA */ ODP_CPU_ARCH_ARMV8_7, + /** ARMv8.8-A ISA */ + ODP_CPU_ARCH_ARMV8_8, + + /** ARMv8.9-A ISA */ + ODP_CPU_ARCH_ARMV8_9, + /** ARMv9.0-A ISA */ ODP_CPU_ARCH_ARMV9_0, @@ -97,6 +103,9 @@ typedef enum odp_cpu_arch_arm_t { /** ARMv9.2-A ISA */ ODP_CPU_ARCH_ARMV9_2, + /** ARMv9.3-A ISA */ + ODP_CPU_ARCH_ARMV9_3, + } odp_cpu_arch_arm_t; /** From 4f180650f7c71022b97797e8493423dbc683f6fb Mon Sep 17 00:00:00 2001 From: Matias Elo Date: Mon, 16 Oct 2023 08:15:10 +0300 Subject: [PATCH 2/4] linux-gen: sysinfo: add new ARMv8 and v9 enumerations Add support for ARM ISA versions ARMv8.8-A, ARMv8.9-A, and ARMv9.3-A. Signed-off-by: Matias Elo Reviewed-by: Petri Savolainen --- platform/linux-generic/arch/aarch64/odp_sysinfo_parse.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/linux-generic/arch/aarch64/odp_sysinfo_parse.c b/platform/linux-generic/arch/aarch64/odp_sysinfo_parse.c index 890004afcd..f242c845e7 100644 --- a/platform/linux-generic/arch/aarch64/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/aarch64/odp_sysinfo_parse.c @@ -263,6 +263,10 @@ static odp_cpu_arch_arm_t arm_isa_version(void) return ODP_CPU_ARCH_ARMV8_6; case 7: return ODP_CPU_ARCH_ARMV8_7; + case 8: + return ODP_CPU_ARCH_ARMV8_8; + case 9: + return ODP_CPU_ARCH_ARMV8_9; default: return ODP_CPU_ARCH_ARM_UNKNOWN; } @@ -274,6 +278,8 @@ static odp_cpu_arch_arm_t arm_isa_version(void) return ODP_CPU_ARCH_ARMV9_1; case 2: return ODP_CPU_ARCH_ARMV9_2; + case 3: + return ODP_CPU_ARCH_ARMV9_3; default: return ODP_CPU_ARCH_ARM_UNKNOWN; } From 1647166f7e293b917f84e35d25c5f9a735beaee3 Mon Sep 17 00:00:00 2001 From: Matias Elo Date: Mon, 16 Oct 2023 08:17:29 +0300 Subject: [PATCH 3/4] example: sysinfo: detect new ARMv8 and v9 ISAs Add support for ARM ISA versions ARMv8.8-A, ARMv8.9-A, and ARMv9.3-A. Signed-off-by: Matias Elo Reviewed-by: Petri Savolainen --- example/sysinfo/odp_sysinfo.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/example/sysinfo/odp_sysinfo.c b/example/sysinfo/odp_sysinfo.c index 05635eec29..0bebac4a20 100644 --- a/example/sysinfo/odp_sysinfo.c +++ b/example/sysinfo/odp_sysinfo.c @@ -98,12 +98,18 @@ static const char *arm_isa(odp_cpu_arch_arm_t isa) return "ARMv8.6-A"; case ODP_CPU_ARCH_ARMV8_7: return "ARMv8.7-A"; + case ODP_CPU_ARCH_ARMV8_8: + return "ARMv8.8-A"; + case ODP_CPU_ARCH_ARMV8_9: + return "ARMv8.9-A"; case ODP_CPU_ARCH_ARMV9_0: return "ARMv9.0-A"; case ODP_CPU_ARCH_ARMV9_1: return "ARMv9.1-A"; case ODP_CPU_ARCH_ARMV9_2: return "ARMv9.2-A"; + case ODP_CPU_ARCH_ARMV9_3: + return "ARMv9.3-A"; default: return "Unknown"; } From 0f2bdd3cf02fbbe6abec46acc237e88a682d4431 Mon Sep 17 00:00:00 2001 From: Matias Elo Date: Mon, 16 Oct 2023 08:20:22 +0300 Subject: [PATCH 4/4] validation: sysinfo: add tests for new ARMv8 and v9 ISAs Add validation tests for ARM ISA versions ARMv8.8-A, ARMv8.9-A, and ARMv9.3-A. Signed-off-by: Matias Elo Reviewed-by: Petri Savolainen --- test/validation/api/system/system.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/validation/api/system/system.c b/test/validation/api/system/system.c index a98ebb6343..89a46a7f2c 100644 --- a/test/validation/api/system/system.c +++ b/test/validation/api/system/system.c @@ -534,12 +534,18 @@ static void system_test_info(void) printf(" ODP_CPU_ARCH_ARMV8_6\n"); else if (info.cpu_isa_sw.arm == ODP_CPU_ARCH_ARMV8_7) printf(" ODP_CPU_ARCH_ARMV8_7\n"); + else if (info.cpu_isa_sw.arm == ODP_CPU_ARCH_ARMV8_8) + printf(" ODP_CPU_ARCH_ARMV8_8\n"); + else if (info.cpu_isa_sw.arm == ODP_CPU_ARCH_ARMV8_9) + printf(" ODP_CPU_ARCH_ARMV8_9\n"); else if (info.cpu_isa_sw.arm == ODP_CPU_ARCH_ARMV9_0) printf(" ODP_CPU_ARCH_ARMV9_0\n"); else if (info.cpu_isa_sw.arm == ODP_CPU_ARCH_ARMV9_1) printf(" ODP_CPU_ARCH_ARMV9_1\n"); else if (info.cpu_isa_sw.arm == ODP_CPU_ARCH_ARMV9_2) printf(" ODP_CPU_ARCH_ARMV9_2\n"); + else if (info.cpu_isa_sw.arm == ODP_CPU_ARCH_ARMV9_3) + printf(" ODP_CPU_ARCH_ARMV9_3\n"); else CU_FAIL("Unknown CPU ISA SW ARCH found!"); @@ -566,12 +572,18 @@ static void system_test_info(void) printf(" ODP_CPU_ARCH_ARMV8_6\n"); else if (info.cpu_isa_hw.arm == ODP_CPU_ARCH_ARMV8_7) printf(" ODP_CPU_ARCH_ARMV8_7\n"); + else if (info.cpu_isa_hw.arm == ODP_CPU_ARCH_ARMV8_8) + printf(" ODP_CPU_ARCH_ARMV8_8\n"); + else if (info.cpu_isa_hw.arm == ODP_CPU_ARCH_ARMV8_9) + printf(" ODP_CPU_ARCH_ARMV8_9\n"); else if (info.cpu_isa_hw.arm == ODP_CPU_ARCH_ARMV9_0) printf(" ODP_CPU_ARCH_ARMV9_0\n"); else if (info.cpu_isa_hw.arm == ODP_CPU_ARCH_ARMV9_1) printf(" ODP_CPU_ARCH_ARMV9_1\n"); else if (info.cpu_isa_hw.arm == ODP_CPU_ARCH_ARMV9_2) printf(" ODP_CPU_ARCH_ARMV9_2\n"); + else if (info.cpu_isa_hw.arm == ODP_CPU_ARCH_ARMV9_3) + printf(" ODP_CPU_ARCH_ARMV9_3\n"); else if (info.cpu_isa_hw.arm == ODP_CPU_ARCH_ARM_UNKNOWN) printf(" ODP_CPU_ARCH_ARM_UNKNOWN\n"); else