Skip to content

Commit f1848b6

Browse files
committed
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 cd88b08 commit f1848b6

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
@@ -204,7 +204,7 @@ void z_prep_c(void)
204204
#if defined(CONFIG_CPU_HAS_FPU)
205205
z_arm_floating_point_init();
206206
#endif
207-
z_bss_zero();
207+
arch_bss_zero();
208208
z_data_copy();
209209
#if defined(CONFIG_ARM_CUSTOM_INTERRUPT_CONTROLLER)
210210
/* 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;
@@ -91,12 +91,12 @@ arch_early_memset(&_nocache_ram_start, 0,
9191
* @brief Clear BSS within the boot region
9292
*
9393
* This routine clears the BSS within the boot region.
94-
* This is separate from z_bss_zero() as boot region may
94+
* This is separate from arch_bss_zero() as boot region may
9595
* contain symbols required for the boot process before
9696
* paging is initialized.
9797
*/
9898
__boot_func
99-
void z_bss_zero_boot(void)
99+
void arch_bss_zero_boot(void)
100100
{
101101
arch_early_memset(&lnkr_boot_bss_start, 0,
102102
(uintptr_t)&lnkr_boot_bss_end
@@ -109,7 +109,7 @@ void z_bss_zero_boot(void)
109109
* @brief Clear BSS within the pinned region
110110
*
111111
* This routine clears the BSS within the pinned region.
112-
* This is separate from z_bss_zero() as pinned region may
112+
* This is separate from arch_bss_zero() as pinned region may
113113
* contain symbols required for the boot process before
114114
* paging is initialized.
115115
*/
@@ -118,7 +118,7 @@ __boot_func
118118
#else
119119
__pinned_func
120120
#endif /* CONFIG_LINKER_USE_BOOT_SECTION */
121-
void z_bss_zero_pinned(void)
121+
void arch_bss_zero_pinned(void)
122122
{
123123
arch_early_memset(&lnkr_pinned_bss_start, 0,
124124
(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
/* load 32-bit operand size IDT */

0 commit comments

Comments
 (0)