eal/arm: update CPU flags
authorJuraj Linkeš <juraj.linkes@pantheon.tech>
Wed, 7 Jul 2021 13:25:40 +0000 (15:25 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 9 Jul 2021 18:00:19 +0000 (20:00 +0200)
There are two execution states on armv8 architecture, aarch64 and
aarch32. Add PLATFORM_STR for the latter and update RTE_ARCH_* flags
according to e9b97392640.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
lib/eal/arm/include/rte_cpuflags_32.h
lib/eal/arm/rte_cpuflags.c

index b5347be..4e25442 100644 (file)
@@ -41,6 +41,7 @@ enum rte_cpu_flag_t {
        RTE_CPUFLAG_SHA2,
        RTE_CPUFLAG_CRC32,
        RTE_CPUFLAG_V7L,
+       RTE_CPUFLAG_V8L,
        /* The last item */
        RTE_CPUFLAG_NUMFLAGS,/**< This should always be the last! */
 };
index d84c9fc..9346119 100644 (file)
@@ -46,8 +46,13 @@ struct feature_entry {
 #define FEAT_DEF(name, reg, bit) \
        [RTE_CPUFLAG_##name] = {reg, bit, #name},
 
+#ifdef RTE_ARCH_32
 #ifdef RTE_ARCH_ARMv7
 #define PLATFORM_STR "v7l"
+#elif defined RTE_ARCH_ARMv8_AARCH32
+#define PLATFORM_STR "v8l"
+#endif
+typedef Elf32_auxv_t _Elfx_auxv_t;
 
 const struct feature_entry rte_cpu_feature_table[] = {
        FEAT_DEF(SWP,       REG_HWCAP,    0)
@@ -77,10 +82,14 @@ const struct feature_entry rte_cpu_feature_table[] = {
        FEAT_DEF(SHA1,      REG_HWCAP2,   2)
        FEAT_DEF(SHA2,      REG_HWCAP2,   3)
        FEAT_DEF(CRC32,     REG_HWCAP2,   4)
+       #ifdef RTE_ARCH_ARMv7
        FEAT_DEF(V7L,       REG_PLATFORM, 0)
+       #elif defined RTE_ARCH_ARMv8_AARCH32
+       FEAT_DEF(V8L,       REG_PLATFORM, 0)
+       #endif
 };
 
-#elif defined RTE_ARCH_ARM64
+#elif defined RTE_ARCH_64
 #define PLATFORM_STR "aarch64"
 
 const struct feature_entry rte_cpu_feature_table[] = {