Commit 58b035b8 authored by Daniel Leung's avatar Daniel Leung Committed by Benjamin Cabé
Browse files

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: default avatarDaniel Leung <daniel.leung@intel.com>
parent e5685cab
Loading
Loading
Loading
Loading
+18 −0
Changes for soc/intel/intel_adsp/ace/ace-link.ld: 18 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -505,6 +505,24 @@ SECTIONS {
  .bss SEGSTART_UNCACHED (NOLOAD) :
  {
    _bss_start = .;

#if defined(CONFIG_ZTEST) && defined(CONFIG_SIMULATOR_XTENSA)
    /* For some weird unknown reasons, the simulator really do not
     * like these 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 by explicitly aligning these variables.
     */
    . = ALIGN(16);
    *:ztest.c.obj(.bss.cpuhold_sem)
    . = ALIGN(16);
    *:ztest.c.obj(.bss.cpuhold_active)
    . = ALIGN(16);
    *:ztest.c.obj(.bss.cpuhold_spawned)
    . = ALIGN(16);
    *:ztest.c.obj(.bss.cpuhold_pool_items)
#endif /* CONFIG_ZTEST && CONFIG_SIMULATOR_XTENSA */

    *(.dynsbss)
    *(.sbss)
    *(.sbss.*)