Skip to content

Commit 56b9e08

Browse files
committed
Added scaffolding for Oryon arch as in SD X Elite
Using NeoverseN1 Kernels for now with cache info taken from official specs.
1 parent f6df9be commit 56b9e08

File tree

11 files changed

+100
-17
lines changed

11 files changed

+100
-17
lines changed

Makefile.arm64

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,21 @@ endif
224224
endif
225225
endif
226226

227+
# Detect Qualcomm Oryon.
228+
ifeq ($(CORE), ORYON)
229+
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ15) $(ISCLANG)))
230+
CCOMMON_OPT += -mcpu=oryon-1
231+
ifneq ($(F_COMPILER), NAG)
232+
FCOMMON_OPT += -mcpu=oryon-1
233+
endif
234+
else
235+
CCOMMON_OPT += -march=armv8.7-a -mtune=neoverse-n1
236+
ifneq ($(F_COMPILER), NAG)
237+
FCOMMON_OPT += -march=armv8.7-a -mtune=neoverse-n1
238+
endif
239+
endif
240+
endif
241+
227242
# Detect Ampere AmpereOne(ampere1,ampere1a) processors.
228243
ifeq ($(CORE), AMPERE1)
229244
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ12) $(ISCLANG)))

Makefile.system

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,7 @@ DYNAMIC_CORE = ARMV8
713713
DYNAMIC_CORE += CORTEXA53
714714
DYNAMIC_CORE += CORTEXA57
715715
DYNAMIC_CORE += NEOVERSEN1
716+
DYNAMIC_CORE += ORYON
716717
ifneq ($(NO_SVE), 1)
717718
DYNAMIC_CORE += NEOVERSEV1
718719
DYNAMIC_CORE += NEOVERSEN2

TargetList.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ A64FX
115115
ARMV8SVE
116116
ARMV9SME
117117
FT2000
118+
ORYON
118119

119120
9.System Z:
120121
ZARCH_GENERIC

cmake/arch.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ endif ()
3333

3434
if (DYNAMIC_ARCH)
3535
if (ARM64)
36-
set(DYNAMIC_CORE ARMV8 CORTEXA53 CORTEXA57 THUNDERX THUNDERX2T99 TSV110 EMAG8180 NEOVERSEN1 THUNDERX3T110)
36+
set(DYNAMIC_CORE ARMV8 CORTEXA53 CORTEXA57 THUNDERX THUNDERX2T99 TSV110 EMAG8180 NEOVERSEN1 THUNDERX3T110 ORYON)
3737
if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
3838
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 10) # SVE ACLE supported in GCC >= 10
3939
set(DYNAMIC_CORE ${DYNAMIC_CORE} NEOVERSEV1 NEOVERSEN2 ARMV8SVE A64FX)

cmake/cc.cmake

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,18 @@ if (${CORE} STREQUAL NEOVERSEN1)
285285
endif ()
286286
endif ()
287287

288+
if (${CORE} STREQUAL ORYON)
289+
if (NOT DYNAMIC_ARCH)
290+
if (${GCC_VERSION} VERSION_GREATER 15.0 OR ${GCC_VERSION} VERSION_EQUAL 15.0)
291+
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.7-a -mtune=oryon-1")
292+
elseif (${GCC_VERSION} VERSION_GREATER 9.4 OR ${GCC_VERSION} VERSION_EQUAL 9.4)
293+
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.7-a -mtune=neoverse-n1")
294+
else ()
295+
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.7-a")
296+
endif ()
297+
endif ()
298+
endif ()
299+
288300
if (${CORE} STREQUAL AMPEREONE)
289301
if (NOT DYNAMIC_ARCH)
290302
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVHPC")

cmake/prebuild.cmake

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,6 +992,37 @@ endif ()
992992
set(ZGEMM_UNROLL_M 4)
993993
set(ZGEMM_UNROLL_N 4)
994994
set(SYMV_P 16)
995+
elseif ("${TCORE}" STREQUAL "ORYON")
996+
file(APPEND ${TARGET_CONF_TEMP}
997+
"#define L1_CODE_SIZE\t196608\n"
998+
"#define L1_CODE_LINESIZE\t64\n"
999+
"#define L1_CODE_ASSOCIATIVE\t6\n"
1000+
"#define L1_DATA_SIZE\t98304\n"
1001+
"#define L1_DATA_LINESIZE\t64\n"
1002+
"#define L1_DATA_ASSOCIATIVE\t6\n"
1003+
"#define L2_SIZE\t12582912\n\n"
1004+
"#define L2_LINESIZE\t32\n"
1005+
"#define L2_ASSOCIATIVE\t12\n"
1006+
"#define ITB_SIZE\t4096\n"
1007+
"#define ITB_DEFAULT_ENTRIES\t256\n"
1008+
"#define ITB_ASSOCIATIVE\t8\n"
1009+
"#define DTB_ASSOCIATIVE\t7\n"
1010+
"#define DTB_DEFAULT_ENTRIES\t48\n"
1011+
"#define DTB_SIZE\t4096\n"
1012+
"#define HAVE_VFPV4\n"
1013+
"#define HAVE_VFPV3\n"
1014+
"#define HAVE_VFP\n"
1015+
"#define HAVE_NEON\n"
1016+
"#define ARMV8\n")
1017+
set(SGEMM_UNROLL_M 16)
1018+
set(SGEMM_UNROLL_N 4)
1019+
set(DGEMM_UNROLL_M 8)
1020+
set(DGEMM_UNROLL_N 4)
1021+
set(CGEMM_UNROLL_M 8)
1022+
set(CGEMM_UNROLL_N 4)
1023+
set(ZGEMM_UNROLL_M 4)
1024+
set(ZGEMM_UNROLL_N 4)
1025+
set(SYMV_P 16)
9951026
elseif ("${TCORE}" STREQUAL "NEOVERSEN1")
9961027
file(APPEND ${TARGET_CONF_TEMP}
9971028
"#define L1_CODE_SIZE\t65536\n"

common_arm64.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ static inline int blas_quickdivide(blasint x, blasint y){
175175
#define HUGE_PAGESIZE ( 4 << 20)
176176

177177
#ifndef BUFFERSIZE
178-
#if defined(NEOVERSEN1) || defined(NEOVERSEN2) || defined(NEOVERSEV1) || defined(A64FX) || defined(ARMV8SVE) || defined(ARMV9SME)
178+
#if defined(NEOVERSEN1) || defined(NEOVERSEN2) || defined(NEOVERSEV1) || defined(A64FX) || defined(ORYON) || defined(ARMV8SVE) || defined(ARMV9SME)
179179
#define BUFFER_SIZE (32 << 22)
180180
#else
181181
#define BUFFER_SIZE (32 << 20)

cpuid_arm64.c

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ size_t length64=sizeof(value64);
7171
#define CPU_CORTEXA710 21
7272
// Qualcomm
7373
#define CPU_FALKOR 6
74+
#define CPU_ORYON 26
7475
// Cavium
7576
#define CPU_THUNDERX 7
7677
#define CPU_THUNDERX2T99 8
@@ -113,7 +114,8 @@ static char *cpuname[] = {
113114
"FT2000",
114115
"CORTEXA76",
115116
"NEOVERSEV2",
116-
"AMPERE1"
117+
"AMPERE1",
118+
"ORYON"
117119
};
118120

119121
static char *cpuname_lower[] = {
@@ -143,7 +145,7 @@ static char *cpuname_lower[] = {
143145
"cortexa76",
144146
"neoversev2",
145147
"ampere1",
146-
"ampere1a"
148+
"oryon"
147149
};
148150

149151
static int cpulowperf=0;
@@ -325,6 +327,8 @@ int detect(void)
325327
// Qualcomm
326328
else if (strstr(cpu_implementer, "0x51") && strstr(cpu_part, "0xc00"))
327329
return CPU_FALKOR;
330+
else if (strstr(cpu_implementer, "0x51") && strstr(cpu_part, "0x001"))
331+
return CPU_ORYON;
328332
// Cavium
329333
else if (strstr(cpu_implementer, "0x43") && strstr(cpu_part, "0x0a1"))
330334
return CPU_THUNDERX;
@@ -418,7 +422,7 @@ int detect(void)
418422
if (errcode != ERROR_SUCCESS) wprintf(L"Error reading cpuname from registry:%x\n",errcode);
419423
//wprintf(stderr,L"%s\n",(PWSTR)valstring);
420424
RegCloseKey(reghandle);
421-
if (strstr(valstring, "Snapdragon(R) X Elite")) return CPU_NEOVERSEN1;
425+
if (strstr(valstring, "Snapdragon(R) X Elite")) return CPU_ORYON;
422426
if (strstr(valstring, "Ampere(R) Altra")) return CPU_NEOVERSEN1;
423427
if (strstr(valstring, "Snapdragon (TM) 8cx Gen 3")) return CPU_CORTEXX1;
424428
if (strstr(valstring, "Snapdragon Compute Platform")) return CPU_CORTEXX1;
@@ -765,6 +769,24 @@ void get_cpuconfig(void)
765769
printf("#define DTB_DEFAULT_ENTRIES 64\n");
766770
printf("#define DTB_SIZE 4096\n");
767771
break;
772+
case CPU_ORYON:
773+
printf("#define ORYON\n");
774+
printf("#define L1_CODE_SIZE 196608\n");
775+
printf("#define L1_CODE_LINESIZE 64\n");
776+
printf("#define L1_CODE_ASSOCIATIVE 6\n");
777+
printf("#define L1_DATA_SIZE 98304\n");
778+
printf("#define L1_DATA_LINESIZE 64\n");
779+
printf("#define L1_DATA_ASSOCIATIVE 6\n");
780+
printf("#define L2_SIZE 12582912\n");
781+
printf("#define L2_LINESIZE 32\n");
782+
printf("#define L2_ASSOCIATIVE 12\n");
783+
printf("#define ITB_SIZE 4096\n");
784+
printf("#define ITB_ASSOCIATIVE 8\n");
785+
printf("#define ITB_DEFAULT_ENTRIES 256\n");
786+
printf("#define DTB_DEFAULT_ENTRIES 224\n");
787+
printf("#define DTB_ASSOCIATIVE 7\n");
788+
printf("#define DTB_SIZE 4096\n");
789+
break;
768790
}
769791
get_cpucount();
770792
}

getarch.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,20 +1449,21 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14491449
#define CORENAME "CORTEXA710"
14501450
#endif
14511451

1452-
#ifdef FORCE_NEOVERSEN1
1452+
#ifdef FORCE_ORYON
14531453
#define FORCE
14541454
#define ARCHITECTURE "ARM64"
1455-
#define SUBARCHITECTURE "NEOVERSEN1"
1455+
#define SUBARCHITECTURE "ORYON"
14561456
#define SUBDIRNAME "arm64"
1457-
#define ARCHCONFIG "-DNEOVERSEN1 " \
1458-
"-DL1_CODE_SIZE=65536 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=4 " \
1459-
"-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=4 " \
1460-
"-DL2_SIZE=1048576 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
1461-
"-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
1457+
#define ARCHCONFIG "-DORYON " \
1458+
"-DL1_CODE_SIZE=196608 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=6 " \
1459+
"-DL1_DATA_SIZE=98304 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=6 " \
1460+
"-DL2_SIZE=12582912 -DL2_LINESIZE=32 -DL2_ASSOCIATIVE=12 " \
1461+
"-DDTB_DEFAULT_ENTRIES=224 -DDTB_ASSOCIATIVE=7 -DDTB_SIZE=4096 " \
1462+
"-DITB_DEFAULT_ENTRIES=256 -DITB_ASSOCIATIVE=8 -DDTB_SIZE=4096 " \
14621463
"-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8 " \
1463-
"-march=armv8.2-a -mtune=neoverse-n1"
1464-
#define LIBNAME "neoversen1"
1465-
#define CORENAME "NEOVERSEN1"
1464+
"-march=armv8.7-a -mtune=oryon-1"
1465+
#define LIBNAME "oryon"
1466+
#define CORENAME "ORYON"
14661467
#endif
14671468

14681469
#ifdef FORCE_NEOVERSEV1
@@ -1481,7 +1482,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14811482
#define CORENAME "NEOVERSEV1"
14821483
#endif
14831484

1484-
14851485
#ifdef FORCE_NEOVERSEN2
14861486
#define FORCE
14871487
#define ARCHITECTURE "ARM64"

kernel/arm64/KERNEL.ORYON

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include $(KERNELDIR)/KERNEL.NEOVERSEN1

0 commit comments

Comments
 (0)