Skip to content

Commit

Permalink
soc: xtensa: intel_adsp: Refine magic key initialization for ACE 1.5
Browse files Browse the repository at this point in the history
Improve the initialization process for setting the magic key in ACE 1.5.

This update modifies the way the magic key is written to the global
variable:
- Utilizes a volatile pointer to ensure the key is directly written to
  the intended memory location.
- Ensures the cache is flushed after the key is set to guarantee
  consistency between the cache and main memory.

Signed-off-by: Tomasz Leman <[email protected]>
  • Loading branch information
tmleman committed Feb 7, 2024
1 parent 397213d commit 9992899
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions soc/xtensa/intel_adsp/ace/multiprocessing.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ void soc_mp_init(void)
/* Set the core 0 active */
soc_cpus_active[0] = true;
#if CONFIG_ACE_VERSION_1_5
g_key_read_holder = INTEL_ADSP_ACE15_MAGIC_KEY;
sys_cache_data_flush_range(&g_key_read_holder, sizeof(g_key_read_holder));
volatile uint32_t* key_write_ptr = z_soc_cached_ptr(&g_key_read_holder);

Check failure on line 95 in soc/xtensa/intel_adsp/ace/multiprocessing.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

POINTER_LOCATION

soc/xtensa/intel_adsp/ace/multiprocessing.c:95 "foo* bar" should be "foo *bar"

*key_write_ptr = INTEL_ADSP_ACE15_MAGIC_KEY;
sys_cache_data_flush_range(key_write_ptr, sizeof(g_key_read_holder));
#endif /* CONFIG_ACE_VERSION_1_5 */
}

Expand Down

0 comments on commit 9992899

Please sign in to comment.