arch: xtensa: Add space for HiFi registers

Updates the xtensa_irq_base_save_area structure to include space
for saving/restoring the HiFi AudioEngine registers used by CP1.

The starting address of these HiFi AE registers also needs to be
referenced from assembly, so it is added to the set of symbols
symbols for which we need an offset to be auto-generated.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
This commit is contained in:
Peter Mitsis 2024-01-10 11:44:43 -05:00 committed by Henrik Brix Andersen
commit 520c8c2283
2 changed files with 17 additions and 0 deletions

View file

@ -61,6 +61,10 @@ GEN_OFFSET_SYM(_xtensa_irq_bsa_t, fpu14);
GEN_OFFSET_SYM(_xtensa_irq_bsa_t, fpu15); GEN_OFFSET_SYM(_xtensa_irq_bsa_t, fpu15);
#endif #endif
#if defined(CONFIG_XTENSA_HIFI_SHARING)
GEN_OFFSET_SYM(_xtensa_irq_bsa_t, hifi);
#endif
#ifdef CONFIG_USERSPACE #ifdef CONFIG_USERSPACE
GEN_OFFSET_SYM(_thread_arch_t, psp); GEN_OFFSET_SYM(_thread_arch_t, psp);
GEN_OFFSET_SYM(_thread_arch_t, ptables); GEN_OFFSET_SYM(_thread_arch_t, ptables);

View file

@ -8,6 +8,7 @@
#include <xtensa/corebits.h> #include <xtensa/corebits.h>
#include <xtensa/config/core-isa.h> #include <xtensa/config/core-isa.h>
#include <xtensa/config/tie.h>
/* /*
* Stack frame layout for a saved processor context, in memory order, * Stack frame layout for a saved processor context, in memory order,
@ -106,6 +107,18 @@ struct xtensa_irq_base_save_area {
uintptr_t fpu15; uintptr_t fpu15;
#endif #endif
#if defined(CONFIG_XTENSA_HIFI_SHARING)
/*
* Carve space for the registers used by the HiFi audio engine
* coprocessor (which is always CP1). Carve additional space to
* manage alignment at run-time as we can not yet guarantee the
* alignment of the BSA.
*/
uint8_t hifi[XCHAL_CP1_SA_SIZE + XCHAL_CP1_SA_ALIGN];
#endif
#if XCHAL_HAVE_THREADPTR #if XCHAL_HAVE_THREADPTR
uintptr_t threadptr; uintptr_t threadptr;
#endif #endif