how the zephyr supportting with running cadence hifi4 lx7,reset_vectorXEA2.s ? #51904
Replies: 1 comment
-
this is my core setup reset vector: // reset-vector.S -- Xtensa Reset Vector // Copyright (c) 1999-2020 Cadence Design Systems, Inc. // This file contents only useful if XEA1 or XEA2 defined #include <xtensa/config/core.h> #if (XCHAL_HAVE_XEA1 || XCHAL_HAVE_XEA2) #include <xtensa/coreasm.h> #if XCHAL_HAVE_MPU if XCHAL_HAVE_CACHEADRDISdefine IFCADelsedefine IFCADendif
// The following reset vector avoids initializing certain registers already
_ResetVector: #if (!XCHAL_HAVE_HALT || defined(XTOS_UNPACK)) && XCHAL_HAVE_IMEM_LOADSTORE
if XCHAL_HAVE_HALT
if XCHAL_RESET_VECTOR_VADDR == XCHAL_INSTRAM0_VADDR
elif XCHAL_RESET_VECTOR_VADDR == XCHAL_INSTROM0_VADDR
elif XCHAL_RESET_VECTOR_VADDR == XCHAL_URAM0_VADDR
elsewarning "Xtensa TX reset vector not at start of iram0, irom0, or uram0 -- ROMing LSPs may not work"
endifendif
if XCHAL_HAVE_MPU && XCHAL_MPU_ENTRIES >= 8 && XCHAL_MPU_BACKGROUND_ENTRIES <= 2
_xtos_mpu_attribs: endif
_ResetHandler: #if !XCHAL_HAVE_HALT
1:
#if XCHAL_HAVE_ICACHE_DYN_WAYS || XCHAL_HAVE_DCACHE_DYN_WAYS if XCHAL_HAVE_PSO_CDM && !XCHAL_HAVE_PSO_FULL_RETENTION
else
endif#endif
#if XCHAL_HAVE_PSO_CDM && !XCHAL_HAVE_PSO_FULL_RETENTION .Lcold_start: #if XCHAL_HAVE_ICACHE_DYN_WAYS || XCHAL_HAVE_DCACHE_DYN_WAYS
#endif .Lwarm_start: #endif
#if XCHAL_HAVE_INTERRUPTS && (XCHAL_HAVE_XEA1 || XCHAL_HAVE_XEA2) // technically this should be under !FULL_RESET, assuming hard reset #if !XCHAL_HAVE_FULL_RESET #if XCHAL_HAVE_CCOUNT && (XCHAL_HW_MIN_VERSION < XTENSA_HWVERSION_RB_2006_0) /* pre-LX2 cores only */
#if XCHAL_ITLB_ARF_WAYS > 0 || XCHAL_DTLB_ARF_WAYS > 0
#if XCHAL_HAVE_DEBUG if XCHAL_NUM_DBREAKif XCHAL_NUM_DBREAK >= 2
endif
endifif XCHAL_HW_MIN_VERSION < XTENSA_HWVERSION_RA_2004_1 && (XCHAL_HAVE_XEA1 || XCHAL_HAVE_XEA2) /* pre-LX cores only */
1: endif#endif #endif /* !XCHAL_HAVE_FULL_RESET */ if XCHAL_XNNE_NUM_SBLKS > 0
if XCHAL_XNNE_NUM_SBLKS > 1
if XCHAL_XNNE_NUM_SBLKS > 2
if XCHAL_XNNE_NUM_SBLKS > 3
#endif #if XCHAL_HAVE_ABSOLUTE_LITERALS #if XCHAL_HAVE_PSO_CDM && ! XCHAL_HAVE_PSO_FULL_RETENTION
if XTOS_PSO_TEST
endif
1: #if XCHAL_HAVE_EXTERN_REGS && XCHAL_HAVE_MP_RUNSTALL
#if XCHAL_HAVE_VECBASE #if XCHAL_HAVE_S32C1I && (XCHAL_HW_MIN_VERSION >= XTENSA_HWVERSION_RC_2009_0) /* have ATOMCTL ? */ if XCHAL_DCACHE_IS_COHERENT
else
endif
#endif #if XCHAL_HAVE_INTERRUPTS && XCHAL_HAVE_DEBUG && (XCHAL_HAVE_XEA1 || XCHAL_HAVE_XEA2)
#if ! XCHAL_HAVE_ICACHE_DYN_WAYS #if XCHAL_HAVE_PSO_CDM && ! XCHAL_HAVE_PSO_FULL_RETENTION #if XCHAL_HAVE_PREFETCH
#if XCHAL_HAVE_MPU
IFCAD .weak __xt_mpu_init_cacheadrdis // value for cacheadrdis
IFCAD movi a4, __xt_mpu_init_cacheadrdis // non-zero if user defined
IFCAD beqz a4, .Lno_default_mpu .Lno_user_mpu: if XCHAL_MPU_ENTRIES >= 8 && XCHAL_MPU_BACKGROUND_ENTRIES <= 2
IFCAD movi a9, 0 // cacheadrdis value
2: extui a8, a2, 28, 4 // get next attribute nibble (msb first) elseIFCAD movi a9, XCHAL_MPU_BG_CACHEADRDIS // default value of CACHEADRDIS for bgnd map endifIFCAD wsr.cacheadrdis a9 // update cacheadrdis
#if XCHAL_DCACHE_IS_COHERENT if XCHAL_HAVE_EXTERN_REGS && XCHAL_HAVE_MX && (XCHAL_HW_MIN_VERSION < XTENSA_HWVERSION_RE_2012_0)
endif#endif
#if XCHAL_USE_MEMCTL
#if XCHAL_HAVE_PSO_CDM #endif /* !XCHAL_HAVE_HALT */
1: #if defined(XTOS_UNPACK) unpackdone: #if defined(XTOS_UNPACK) || defined(XTOS_MP) #if !XCHAL_HAVE_HALT /* skip for TX */
#if XCHAL_HAVE_ABSOLUTE_LITERALS && XSHAL_USE_ABSOLUTE_LITERALS if XCHAL_HAVE_WINDOWED && defined(XTENSA_WINDOWED_ABI)
endif#if XCHAL_HW_MIN_VERSION < XTENSA_HWVERSION_RB_2006_0 /* only pre-LX2 needs this */ if XCHAL_HAVE_CP
endif
if XCHAL_HAVE_FP && !XCHAL_HAVE_VECTORFPU2005
endif#endif /* pre-LX2 */
#if HAVE_XSR && (XCHAL_HAVE_XEA1 || XCHAL_HAVE_XEA2) /* For asm macros; works for positive a,b smaller than 1000: */ define GREATERTHAN(a,b) (((b)-(a)) & ~0xFFF)ifndef XCHAL_DEBUGLEVEL /* debug option not selected? */define XCHAL_DEBUGLEVEL 99 /* bogus value outside 2..6 */endif
#endif /HAVE_XSR/
#else /* XCHAL_HAVE_HALT */
if !defined(XTENSA_CALL0_ABI) || !XCHAL_HAVE_FULL_RESET || XCHAL_HAVE_INTERRUPTS || XCHAL_HAVE_CCOUNT || XCHAL_DTLB_ARF_WAYS || XCHAL_HAVE_DEBUG || XCHAL_HAVE_S32C1I || XCHAL_HAVE_ABSOLUTE_LITERALS || XCHAL_DCACHE_SIZE || XCHAL_ICACHE_SIZE || XCHAL_HAVE_PIF || XCHAL_HAVE_WINDOWEDerror "Halt architecture (Xtensa TX) requires: call0 ABI, all flops reset, no exceptions or interrupts, no TLBs, no debug, no S32C1I, no LITBASE, no cache, no PIF, no windowed regs"endif#endif /* XCHAL_HAVE_HALT */ #if (!XCHAL_HAVE_HALT || defined(XTOS_UNPACK)) && XCHAL_HAVE_IMEM_LOADSTORE
#endif /* (XCHAL_HAVE_XEA1 || XCHAL_HAVE_XEA2) */ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
hi sir,
we wanna porrting the zephyr with running cadence hifi4 LX7 arch.and we use the startup file (reset_vector XEA2.S)
and i check the zephyr source with xtensa startup with reference on cadence reset_vector.s.and i compare my reset_vector XEA2.S and zephyr startup file(reset_vector.s),there are some difference,so the zephyr support all the cadence hifi X? or some define??
i run the sof case with zephyr ,and the IDE using cadence Xplorer simulation mode,and sof_main get dsp core id,and fail.
i don;t whether our hifi4 lx7 arch and core configuration doesnot adapter the zephyr xtensa startup file?
i consider that the zephyr source may just support xtensa one arch,such as LX6??and not support LX7,if we need porrting LX7,and modify some files?
and the Is it a big change? What files do I need to change?
Beta Was this translation helpful? Give feedback.
All reactions