arch: xtensa: fix master_core_data initialization

Fixes master_core_data initialization in case PLATFORM_MASTER_CORE_ID
is not zero.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit is contained in:
Tomasz Lauda 2020-05-26 08:58:40 +02:00 committed by Tomasz Lauda
parent dc8a9feaea
commit 643c2300a4
1 changed files with 9 additions and 1 deletions

View File

@ -108,12 +108,20 @@ _start:
#include "reset-unneeded.S"
#endif
#if !CONFIG_SMP
// Init xtos struct ptr
movi a2, master_core_data
movi a3, core_data_ptr
s32i a2, a3, 0
#else
// Init xtos struct ptr
movi a2, 4
mull a2, a2, a5
movi a3, core_data_ptr
add a3, a3, a2
movi a2, master_core_data
s32i a2, a3, 0
#if CONFIG_SMP
// Initialize the stack pointer.
// See the "ABI and Software Conventions" chapter in the
// Xtensa ISA Reference manual for details.