Peter
Peter

Reputation: 25

how to find the implementation of s_init() which called by lowlevel_init() in uboot

in u-boot-2017.05-rc3\arch\arm\cpu\armv8\lowlevel_init.S

lowlevel_init() called function s_init()

but i cannot find the implementation of s_init() function in the project

i have "grep -nirs s_init ." in all the project, but there is no s_init implementation about armv8.

there are some code here: /* * Call the very early init function. This should do only the * absolute bare minimum to get started. It should not: * * - set up DRAM * - use global_data * - clear BSS * - try to start a console * * For boards with SPL this should be empty since SPL can do all of * this init in the SPL board_init_f() function which is called * immediately after this. */ bl s_init

Upvotes: 0

Views: 341

Answers (1)

Xypron
Xypron

Reputation: 2483

For ARMv7 a weak implementation of s_init() exists in arch/arm/cpu/armv7/lowlevel_init.S

.pushsection .text.s_init, "ax"
WEAK(s_init)
        bx      lr
ENDPROC(s_init)
.popsection

Several boards reimplement this function.

arch/arm/cpu/armv8/Makefile has this line:

obj-$(CONFIG_ARCH_SUNXI) += lowlevel_init.o

So this module is only built for SUNXI boards. s_init() is implemented in arch/arm/mach-sunxi/board.c.

Upvotes: 1

Related Questions