8
8
#include <zephyr/cache.h>
9
9
#include <zephyr/logging/log.h>
10
10
#include <zephyr/mem_mgmt/mem_attr.h>
11
- #ifdef CONFIG_DCACHE
11
+ #ifdef CONFIG_CACHE_MANAGEMENT
12
12
#include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h>
13
- #endif /* CONFIG_DCACHE */
13
+ #endif /* CONFIG_CACHE_MANAGEMENT */
14
14
15
15
#ifdef CONFIG_NOCACHE_MEMORY
16
16
#include <zephyr/linker/linker-defs.h>
@@ -48,8 +48,9 @@ void soc_early_init_hook(void)
48
48
/*
49
49
* Set default temperature for spotmgr to room temperature
50
50
*/
51
- am_hal_pwrctrl_temp_thresh_t dummy [32 ];
52
- am_hal_pwrctrl_temp_update (25.0f , dummy );
51
+ am_hal_pwrctrl_temp_thresh_t dummy ;
52
+
53
+ am_hal_pwrctrl_temp_update (25.0f , & dummy );
53
54
54
55
/* Enable Icache*/
55
56
sys_cache_instr_enable ();
@@ -63,6 +64,10 @@ bool buf_in_nocache(uintptr_t buf, size_t len_bytes)
63
64
{
64
65
bool buf_within_nocache = false;
65
66
67
+ if (buf == 0 || len_bytes == 0 ) {
68
+ return buf_within_nocache ;
69
+ }
70
+
66
71
#if CONFIG_NOCACHE_MEMORY
67
72
/* Check if buffer is in nocache region defined by the linker */
68
73
buf_within_nocache = (buf >= ((uintptr_t )_nocache_ram_start )) &&
0 commit comments