Skip to content

Commit 58b035b

Browse files
dcpleungkartben
authored andcommitted
soc: intel_adsp/ace: linker: align cpuhold_* variables
For some weird unknown reasons, the simulator really do not like the cpuhold_* variables to be tightly packed together. This results in cpuhold_spawned not being updated, and we will be stuck in the while loop for it to be set. Workaround this by explicitly aligning these variables on 16 byte boundary. This seems to work for now. Signed-off-by: Daniel Leung <[email protected]>
1 parent e5685ca commit 58b035b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

soc/intel/intel_adsp/ace/ace-link.ld

+18
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,24 @@ SECTIONS {
505505
.bss SEGSTART_UNCACHED (NOLOAD) :
506506
{
507507
_bss_start = .;
508+
509+
#if defined(CONFIG_ZTEST) && defined(CONFIG_SIMULATOR_XTENSA)
510+
/* For some weird unknown reasons, the simulator really do not
511+
* like these cpuhold_* variables to be tightly packed together.
512+
* This results in cpuhold_spawned not being updated, and we
513+
* will be stuck in the while loop for it to be set.
514+
* Workaround by explicitly aligning these variables.
515+
*/
516+
. = ALIGN(16);
517+
*:ztest.c.obj(.bss.cpuhold_sem)
518+
. = ALIGN(16);
519+
*:ztest.c.obj(.bss.cpuhold_active)
520+
. = ALIGN(16);
521+
*:ztest.c.obj(.bss.cpuhold_spawned)
522+
. = ALIGN(16);
523+
*:ztest.c.obj(.bss.cpuhold_pool_items)
524+
#endif /* CONFIG_ZTEST && CONFIG_SIMULATOR_XTENSA */
525+
508526
*(.dynsbss)
509527
*(.sbss)
510528
*(.sbss.*)

0 commit comments

Comments
 (0)