Sound Open Firmware
Loading...
Searching...
No Matches
memory.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 *
3 * Copyright(c) 2024 Intel Corporation.
4 */
5
12#ifndef __SOF_LIB_MEMORY_H__
13#define __SOF_LIB_MEMORY_H__
14
15#include <platform/lib/memory.h>
16#include <stdbool.h>
17
28#ifndef __cold
29#define __cold
30#endif
31
35#ifndef __cold_rodata
36#define __cold_rodata
37#endif
38
39#ifdef __ZEPHYR__
41#else
42#define ll_sch_is_current() false
43#endif
44
45#if CONFIG_COLD_STORE_EXECUTE_DEBUG
46#include <rtos/panic.h>
47
52
57
61void dbg_path_hot_confirm(void);
62
67void dbg_path_cold_enter(const char *fn);
68
73static inline void __assert_can_be_cold(const char *fn)
74{
75 if (k_is_user_context())
76 return;
77
78 __ASSERT(!ll_sch_is_current(), "%s() called from an LL thread!", fn);
80}
81
85#define assert_can_be_cold() __assert_can_be_cold(__func__)
86#else
87#define dbg_path_hot_start_watching() do {} while (0)
88#define dbg_path_hot_stop_watching() do {} while (0)
89#define dbg_path_hot_confirm() do {} while (0)
90#define dbg_path_cold_enter() do {} while (0)
94#define assert_can_be_cold() do {} while (0)
95#endif
96
99#endif /* __SOF_LIB_MEMORY_H__ */
#define dbg_path_hot_stop_watching()
Definition memory.h:88
#define dbg_path_hot_start_watching()
Definition memory.h:87
#define dbg_path_hot_confirm()
Definition memory.h:89
bool ll_sch_is_current(void)
#define dbg_path_cold_enter()
Definition memory.h:90