ARC: prepare for building for ARCv3 HS6x

Do basic preparations for building code for ARCv3 HS6x
* add ISA_ARCV3 and CPU_HS6X config options
* add off_t type support for __ARC64__
* use elf64-littlearc format for linking
* use arc64 mcpu for CPU_HS6X

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
This commit is contained in:
Evgeniy Paltsev 2021-03-31 00:48:35 +03:00 committed by Kumar Gala
commit 6afe7c5fd2
4 changed files with 27 additions and 2 deletions

View file

@ -39,6 +39,11 @@ config ISA_ARCV2
help
v2 ISA for the ARC-HS & ARC-EM cores
config ISA_ARCV3
bool "ARC ISA v3"
select USE_SWITCH
select USE_SWITCH_SUPPORTED
endchoice
if ISA_ARCV2
@ -83,6 +88,17 @@ config CPU_HS3X
endif #ISA_ARCV2
if ISA_ARCV3
config CPU_HS6X
bool
select CPU_ARCHS
select 64BIT
help
If y, the SoC uses an ARC HS6x CPU
endif #ISA_ARCV3
config FP_FPU_DA
bool
@ -123,6 +139,7 @@ config RGF_NUM_BANKS
config ARC_FIRQ
bool "FIRQ enable"
depends on ISA_ARCV2
default y
help
Fast interrupts are supported (FIRQ). If FIRQ enabled, for interrupts
@ -147,6 +164,7 @@ config ARC_FIRQ_STACK_SIZE
config ARC_HAS_STACK_CHECKING
bool "ARC has STACK_CHECKING"
depends on ISA_ARCV2
default y
help
ARC is configured with STACK_CHECKING which is a mechanism for
@ -233,6 +251,7 @@ config ARC_HAS_ACCL_REGS
config ARC_HAS_SECURE
bool "ARC has SecureShield"
depends on ISA_ARCV2
select CPU_HAS_TEE
select ARCH_HAS_TRUSTED_EXECUTION
help

View file

@ -56,6 +56,8 @@ elseif("${ARCH}" STREQUAL "arc")
set(GCC_M_CPU em4_fpuda)
elseif(CONFIG_CPU_HS3X)
set(GCC_M_CPU hs)
elseif(CONFIG_CPU_HS6X)
set(GCC_M_CPU arc64)
elseif(CONFIG_CPU_EM4)
set(GCC_M_CPU arcem)
elseif(CONFIG_CPU_EM6)

View file

@ -27,7 +27,11 @@
#elif defined(CONFIG_ARM64)
OUTPUT_FORMAT("elf64-littleaarch64")
#elif defined(CONFIG_ARC)
OUTPUT_FORMAT("elf32-littlearc", "elf32-bigarc", "elf32-littlearc")
#if defined(CONFIG_64BIT)
OUTPUT_FORMAT("elf64-littlearc")
#else
OUTPUT_FORMAT("elf32-littlearc", "elf32-bigarc", "elf32-littlearc")
#endif
#elif defined(CONFIG_X86)
#if defined(CONFIG_X86_64)
OUTPUT_FORMAT("elf64-x86-64")

View file

@ -25,7 +25,7 @@ typedef __SIZE_TYPE__ ssize_t;
#if !defined(__off_t_defined)
#define __off_t_defined
#if defined(__i386) || defined(__x86_64)
#if defined(__i386) || defined(__x86_64) || defined(__ARC64__)
typedef long int off_t; /* "long" works for all of i386, X32 and true 64 bit */
#elif defined(__ARM_ARCH)
typedef int off_t;