zephyr: lib/cpu.h: remove dependency to platform layer

Remove dependency to platform cpu.h layer for Zephyr targets. The lib/cpu.h
is now common to all SOF targets when building for Zephyr.

Add a note to PLATFORM_PRIMARY_CORE_ID documentation that "primary core"
is a SOF/application convention and not visible in Zephyr OS interfaces.

Core 0 is the boot core in Zephyr, so use this definition as
PLATFORM_PRIMARY_CORE_ID for all SOF targets. This was already the case
in all platform definitions, so no functional change.

In SOF, the primary/secondary distinction is primarily used
in IPC code, together with Zephyr CONFIG_SMP_BOOT_DELAY=y.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This commit is contained in:
Kai Vehmanen 2024-11-12 10:44:27 +02:00 committed by Kai Vehmanen
parent afaa9e8fec
commit 5ced8a4f62
1 changed files with 9 additions and 1 deletions

View File

@ -14,7 +14,15 @@
#ifndef __SOF_LIB_CPU_H__
#define __SOF_LIB_CPU_H__
#include <platform/lib/cpu.h>
/**
* \brief Id of primary DSP core
*
* SOF IPC protocols make a distinction between primary
* and secondary cores. In Zephyr, primary core id concept
* is not present in public OS interface, but in implementation
* zero is the boot core (see z_smp_init() in Zephyr).
*/
#define PLATFORM_PRIMARY_CORE_ID 0
#if !defined(__ASSEMBLER__) && !defined(LINKER)