Skip to content

Commit

Permalink
trace: split out trace-soflogger.h and trace-boot.h
Browse files Browse the repository at this point in the history
The SOF trace.h is a bit hard to follow as it mixes frontend
and backend definitions. The frontend definitions like
tr_info() are needed by all SOF builds. The backends can
vary and the application traces can be routed to SOF DMA
trace (sof-logger), Zephyr logging subsystem or optionally
compiled out when tracing is disabled.

Improve readability of the header by moving all definitions
related to the sof-logger backend to a separate trace-soflogger.h
header file.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
  • Loading branch information
kv2019i authored and lgirdwood committed Oct 21, 2024
1 parent 73a17ae commit 79043b4
Show file tree
Hide file tree
Showing 3 changed files with 480 additions and 432 deletions.
54 changes: 54 additions & 0 deletions src/include/sof/trace/trace-boot.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright(c) 2016,2024 Intel Corporation.
*/

#ifndef __SOF_TRACE_TRACE_BOOT_H__
#define __SOF_TRACE_TRACE_BOOT_H__

/* bootloader trace values */
#define TRACE_BOOT_LDR_ENTRY 0x100
#define TRACE_BOOT_LDR_HPSRAM 0x110
#define TRACE_BOOT_LDR_MANIFEST 0x120
#define TRACE_BOOT_LDR_LPSRAM 0x130
#define TRACE_BOOT_LDR_L1DRAM 0x140
#define TRACE_BOOT_LDR_JUMP 0x150

#define TRACE_BOOT_LDR_PARSE_MODULE 0x210
#define TRACE_BOOT_LDR_PARSE_SEGMENT 0x220

/* general trace init codes - only used at boot
* when main trace is not available
*/
#define TRACE_BOOT_START 0x1000
#define TRACE_BOOT_ARCH 0x2000
#define TRACE_BOOT_SYS 0x3000
#define TRACE_BOOT_PLATFORM 0x4000

/* system specific codes */
#define TRACE_BOOT_SYS_HEAP (TRACE_BOOT_SYS + 0x100)
#define TRACE_BOOT_SYS_TRACES (TRACE_BOOT_SYS + 0x200)
#define TRACE_BOOT_SYS_NOTIFIER (TRACE_BOOT_SYS + 0x300)
#define TRACE_BOOT_SYS_POWER (TRACE_BOOT_SYS + 0x400)

/* platform/device specific codes */
#define TRACE_BOOT_PLATFORM_ENTRY (TRACE_BOOT_PLATFORM + 0x100)
#define TRACE_BOOT_PLATFORM_IRQ (TRACE_BOOT_PLATFORM + 0x110)
#define TRACE_BOOT_PLATFORM_MBOX (TRACE_BOOT_PLATFORM + 0x120)
#define TRACE_BOOT_PLATFORM_SHIM (TRACE_BOOT_PLATFORM + 0x130)
#define TRACE_BOOT_PLATFORM_PMC (TRACE_BOOT_PLATFORM + 0x140)
#define TRACE_BOOT_PLATFORM_TIMER (TRACE_BOOT_PLATFORM + 0x150)
#define TRACE_BOOT_PLATFORM_CLOCK (TRACE_BOOT_PLATFORM + 0x160)
#define TRACE_BOOT_PLATFORM_SCHED (TRACE_BOOT_PLATFORM + 0x170)
#define TRACE_BOOT_PLATFORM_AGENT (TRACE_BOOT_PLATFORM + 0x180)
#define TRACE_BOOT_PLATFORM_CPU_FREQ (TRACE_BOOT_PLATFORM + 0x190)
#define TRACE_BOOT_PLATFORM_SSP_FREQ (TRACE_BOOT_PLATFORM + 0x1A0)
#define TRACE_BOOT_PLATFORM_DMA (TRACE_BOOT_PLATFORM + 0x1B0)
#define TRACE_BOOT_PLATFORM_IPC (TRACE_BOOT_PLATFORM + 0x1C0)
#define TRACE_BOOT_PLATFORM_IDC (TRACE_BOOT_PLATFORM + 0x1D0)
#define TRACE_BOOT_PLATFORM_DAI (TRACE_BOOT_PLATFORM + 0x1E0)
#define TRACE_BOOT_PLATFORM_SSP (TRACE_BOOT_PLATFORM + 0x1F0)
#define TRACE_BOOT_PLATFORM_SPI (TRACE_BOOT_PLATFORM + 0x200)
#define TRACE_BOOT_PLATFORM_DMA_TRACE (TRACE_BOOT_PLATFORM + 0x210)

#endif /* __SOF_TRACE_TRACE_BOOT_H__ */
Loading

0 comments on commit 79043b4

Please sign in to comment.