Skip to content

Commit 6b46c82

Browse files
nashifcfriedt
authored andcommitted
arch: init: z_bss_zero -> arch_bss_zero
Do not use private API prefix and move to architecture interface as those functions are primarily used across arches and can be defined by the architecture. Signed-off-by: Anas Nashif <[email protected]>
1 parent d98184c commit 6b46c82

File tree

17 files changed

+29
-29
lines changed

17 files changed

+29
-29
lines changed

arch/arc/core/prep_c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ void z_prep_c(void)
9292
arc_cluster_scm_enable();
9393
#endif
9494

95-
z_bss_zero();
95+
arch_bss_zero();
9696
#ifdef __CCAC__
9797
dev_state_zero();
9898
#endif

arch/arm/core/cortex_a_r/prep_c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void z_prep_c(void)
109109
#if defined(CONFIG_CPU_HAS_FPU)
110110
z_arm_floating_point_init();
111111
#endif
112-
z_bss_zero();
112+
arch_bss_zero();
113113
z_data_copy();
114114
#if ((defined(CONFIG_ARMV7_R) || defined(CONFIG_ARMV7_A)) && defined(CONFIG_INIT_STACKS))
115115
z_arm_init_stacks();

arch/arm/core/cortex_m/prep_c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ void z_prep_c(void)
205205
#if defined(CONFIG_CPU_HAS_FPU)
206206
z_arm_floating_point_init();
207207
#endif
208-
z_bss_zero();
208+
arch_bss_zero();
209209
z_data_copy();
210210
#if defined(CONFIG_ARM_CUSTOM_INTERRUPT_CONTROLLER)
211211
/* Invoke SoC-specific interrupt controller initialization */

arch/arm64/core/prep_c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void z_prep_c(void)
4040
/* Initialize tpidrro_el0 with our struct _cpu instance address */
4141
write_tpidrro_el0((uintptr_t)&_kernel.cpus[0]);
4242

43-
z_bss_zero();
43+
arch_bss_zero();
4444
z_data_copy();
4545
#ifdef CONFIG_ARM64_SAFE_EXCEPTION_STACK
4646
/* After bss clean, _kernel.cpus is in bss section */

arch/common/init.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void __weak arch_early_memcpy(void *dst, const void *src, size_t n)
4848
* This routine clears the BSS region, so all bytes are 0.
4949
*/
5050
__boot_func
51-
void z_bss_zero(void)
51+
void arch_bss_zero(void)
5252
{
5353
if (IS_ENABLED(CONFIG_SKIP_BSS_CLEAR)) {
5454
return;
@@ -90,12 +90,12 @@ void z_bss_zero(void)
9090
* @brief Clear BSS within the boot region
9191
*
9292
* This routine clears the BSS within the boot region.
93-
* This is separate from z_bss_zero() as boot region may
93+
* This is separate from arch_bss_zero() as boot region may
9494
* contain symbols required for the boot process before
9595
* paging is initialized.
9696
*/
9797
__boot_func
98-
void z_bss_zero_boot(void)
98+
void arch_bss_zero_boot(void)
9999
{
100100
arch_early_memset(&lnkr_boot_bss_start, 0,
101101
(uintptr_t)&lnkr_boot_bss_end
@@ -108,7 +108,7 @@ void z_bss_zero_boot(void)
108108
* @brief Clear BSS within the pinned region
109109
*
110110
* This routine clears the BSS within the pinned region.
111-
* This is separate from z_bss_zero() as pinned region may
111+
* This is separate from arch_bss_zero() as pinned region may
112112
* contain symbols required for the boot process before
113113
* paging is initialized.
114114
*/
@@ -117,7 +117,7 @@ __boot_func
117117
#else
118118
__pinned_func
119119
#endif /* CONFIG_LINKER_USE_BOOT_SECTION */
120-
void z_bss_zero_pinned(void)
120+
void arch_bss_zero_pinned(void)
121121
{
122122
arch_early_memset(&lnkr_pinned_bss_start, 0,
123123
(uintptr_t)&lnkr_pinned_bss_end

arch/mips/core/prep_c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void z_prep_c(void)
5050
#if defined(CONFIG_SOC_PREP_HOOK)
5151
soc_prep_hook();
5252
#endif
53-
z_bss_zero();
53+
arch_bss_zero();
5454

5555
interrupt_init();
5656
#if CONFIG_ARCH_CACHE

arch/riscv/core/prep_c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void z_prep_c(void)
4040
soc_prep_hook();
4141
#endif
4242

43-
z_bss_zero();
43+
arch_bss_zero();
4444
z_data_copy();
4545
#if defined(CONFIG_RISCV_SOC_INTERRUPT_INIT)
4646
soc_interrupt_init();

arch/rx/core/prep_c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ K_KERNEL_PINNED_STACK_ARRAY_DEFINE(z_initialization_process_stacks, CONFIG_MP_MA
3333
*/
3434
void z_prep_c(void)
3535
{
36-
z_bss_zero();
36+
arch_bss_zero();
3737

3838
z_data_copy();
3939

arch/sparc/core/reset_trap.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ SECTION_FUNC(TEXT, __sparc_trap_reset)
5757
nop
5858
#endif
5959

60-
call z_bss_zero
60+
call arch_bss_zero
6161
nop
6262

6363
call z_prep_c

arch/x86/core/ia32/crt0.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
/* externs */
3232
GTEXT(z_prep_c)
33-
GTEXT(z_bss_zero)
33+
GTEXT(arch_bss_zero)
3434
GTEXT(z_data_copy)
3535

3636
GDATA(_idt_base_address)
@@ -265,18 +265,18 @@ __csSet:
265265
#endif
266266
/* Clear BSS */
267267
#ifdef CONFIG_LINKER_USE_BOOT_SECTION
268-
call z_bss_zero_boot
268+
call arch_bss_zero_boot
269269
#endif
270270
#ifdef CONFIG_LINKER_USE_PINNED_SECTION
271-
call z_bss_zero_pinned
271+
call arch_bss_zero_pinned
272272
#endif
273273
#ifdef CONFIG_LINKER_GENERIC_SECTIONS_PRESENT_AT_BOOT
274274
/* Don't clear BSS if the section is not present
275275
* in memory at boot. Or else it would cause page
276276
* faults. Zeroing BSS will be done later once the
277277
* paging mechanism has been initialized.
278278
*/
279-
call z_bss_zero
279+
call arch_bss_zero
280280
#endif
281281

282282
#ifdef CONFIG_X86_CET

0 commit comments

Comments
 (0)