File tree Expand file tree Collapse file tree 14 files changed +179
-0
lines changed Expand file tree Collapse file tree 14 files changed +179
-0
lines changed Original file line number Diff line number Diff line change 23
23
#include <zephyr/arch/arc/cluster.h>
24
24
#include <zephyr/kernel_structs.h>
25
25
#include <kernel_internal.h>
26
+ #include <zephyr/platform/hooks.h>
26
27
27
28
/* XXX - keep for future use in full-featured cache APIs */
28
29
#if 0
@@ -121,6 +122,10 @@ extern FUNC_NORETURN void z_cstart(void);
121
122
122
123
void z_prep_c (void )
123
124
{
125
+ #if defined(CONFIG_SOC_PREP_HOOK )
126
+ soc_prep_hook ();
127
+ #endif
128
+
124
129
#ifdef CONFIG_ISA_ARCV3
125
130
arc_cluster_scm_enable ();
126
131
#endif
Original file line number Diff line number Diff line change 21
21
#include <zephyr/linker/linker-defs.h>
22
22
#include <zephyr/sys/barrier.h>
23
23
#include <zephyr/arch/arm/cortex_a_r/lib_helpers.h>
24
+ #include <zephyr/platform/hooks.h>
24
25
25
26
#if defined(CONFIG_ARMV7_R ) || defined(CONFIG_ARMV7_A )
26
27
#include <cortex_a_r/stack.h>
@@ -147,6 +148,9 @@ extern FUNC_NORETURN void z_cstart(void);
147
148
*/
148
149
void z_prep_c (void )
149
150
{
151
+ #if defined(CONFIG_SOC_PREP_HOOK )
152
+ soc_prep_hook ();
153
+ #endif
150
154
/* Initialize tpidruro with our struct _cpu instance address */
151
155
write_tpidruro ((uintptr_t )& _kernel .cpus [0 ]);
152
156
Original file line number Diff line number Diff line change 20
20
#include <kernel_internal.h>
21
21
#include <zephyr/linker/linker-defs.h>
22
22
#include <zephyr/sys/barrier.h>
23
+ #include <zephyr/platform/hooks.h>
23
24
24
25
#if defined(__GNUC__ )
25
26
/*
@@ -181,6 +182,10 @@ extern FUNC_NORETURN void z_cstart(void);
181
182
*/
182
183
void z_prep_c (void )
183
184
{
185
+ #if defined(CONFIG_SOC_PREP_HOOK )
186
+ soc_prep_hook ();
187
+ #endif
188
+
184
189
relocate_vector_table ();
185
190
#if defined(CONFIG_CPU_HAS_FPU )
186
191
z_arm_floating_point_init ();
Original file line number Diff line number Diff line change 16
16
17
17
#include <kernel_internal.h>
18
18
#include <zephyr/linker/linker-defs.h>
19
+ #include <zephyr/platform/hooks.h>
19
20
20
21
extern void z_arm64_mm_init (bool is_primary_core );
21
22
@@ -30,6 +31,10 @@ __weak void z_arm64_mm_init(bool is_primary_core) { }
30
31
*/
31
32
void z_prep_c (void )
32
33
{
34
+ #if defined(CONFIG_SOC_PREP_HOOK )
35
+ soc_prep_hook ();
36
+ #endif
37
+
33
38
/* Initialize tpidrro_el0 with our struct _cpu instance address */
34
39
write_tpidrro_el0 ((uintptr_t )& _kernel .cpus [0 ]);
35
40
Original file line number Diff line number Diff line change 11
11
12
12
#include <kernel_internal.h>
13
13
#include <zephyr/irq.h>
14
+ #include <zephyr/platform/hooks.h>
14
15
15
16
static void interrupt_init (void )
16
17
{
@@ -44,6 +45,9 @@ static void interrupt_init(void)
44
45
45
46
void z_prep_c (void )
46
47
{
48
+ #if defined(CONFIG_SOC_PREP_HOOK )
49
+ soc_prep_hook ();
50
+ #endif
47
51
z_bss_zero ();
48
52
49
53
interrupt_init ();
Original file line number Diff line number Diff line change 21
21
#include <zephyr/linker/linker-defs.h>
22
22
#include <zephyr/kernel_structs.h>
23
23
#include <kernel_internal.h>
24
+ #include <zephyr/platform/hooks.h>
24
25
25
26
/**
26
27
* @brief Prepare to and run C code
30
31
31
32
void z_prep_c (void )
32
33
{
34
+ #if defined(CONFIG_SOC_PREP_HOOK )
35
+ soc_prep_hook ();
36
+ #endif
37
+
33
38
z_bss_zero ();
34
39
z_data_copy ();
35
40
/* In most XIP scenarios we copy the exception code into RAM, so need
Original file line number Diff line number Diff line change 19
19
#include <zephyr/toolchain.h>
20
20
#include <zephyr/kernel_structs.h>
21
21
#include <kernel_internal.h>
22
+ #include <zephyr/platform/hooks.h>
22
23
23
24
#if defined(CONFIG_RISCV_SOC_INTERRUPT_INIT )
24
25
void soc_interrupt_init (void );
@@ -33,6 +34,10 @@ void soc_interrupt_init(void);
33
34
34
35
void z_prep_c (void )
35
36
{
37
+ #if defined(CONFIG_SOC_PREP_HOOK )
38
+ soc_prep_hook ();
39
+ #endif
40
+
36
41
z_bss_zero ();
37
42
z_data_copy ();
38
43
#if defined(CONFIG_RISCV_SOC_INTERRUPT_INIT )
Original file line number Diff line number Diff line change 10
10
*/
11
11
12
12
#include <kernel_internal.h>
13
+ #include <zephyr/platform/hooks.h>
13
14
14
15
/**
15
16
* @brief Prepare to and run C code
19
20
20
21
void z_prep_c (void )
21
22
{
23
+ #if defined(CONFIG_SOC_PREP_HOOK )
24
+ soc_prep_hook ();
25
+ #endif
22
26
z_data_copy ();
23
27
z_cstart ();
24
28
CODE_UNREACHABLE ;
Original file line number Diff line number Diff line change 9
9
#include <zephyr/arch/x86/multiboot.h>
10
10
#include <zephyr/arch/x86/efi.h>
11
11
#include <x86_mmu.h>
12
+ #include <zephyr/platform/hooks.h>
12
13
13
14
extern FUNC_NORETURN void z_cstart (void );
14
15
extern void x86_64_irq_init (void );
@@ -25,6 +26,9 @@ FUNC_NORETURN void z_prep_c(void *arg)
25
26
{
26
27
x86_boot_arg_t * cpu_arg = arg ;
27
28
29
+ #if defined(CONFIG_SOC_PREP_HOOK )
30
+ soc_prep_hook ();
31
+ #endif
28
32
_kernel .cpus [0 ].nested = 0 ;
29
33
30
34
#ifdef CONFIG_MMU
Original file line number Diff line number Diff line change 5
5
*/
6
6
#include <zephyr/kernel.h>
7
7
#include <kernel_internal.h>
8
+ #include <zephyr/platform/hooks.h>
8
9
9
10
extern FUNC_NORETURN void z_cstart (void );
10
11
@@ -20,6 +21,9 @@ extern void soc_num_cpus_init(void);
20
21
*/
21
22
void z_prep_c (void )
22
23
{
24
+ #if defined(CONFIG_SOC_PREP_HOOK )
25
+ soc_prep_hook ();
26
+ #endif
23
27
#if CONFIG_SOC_HAS_RUNTIME_NUM_CPUS
24
28
soc_num_cpus_init ();
25
29
#endif
You can’t perform that action at this time.
0 commit comments