Results 1 to 3 of 3
Hi guys,
I am understanding the linux start up sequence and stuck at the following:
start_kernel() -> rest_init() -> kernel_init() -> do_basic_setup() -> do_initcalls()
As per my understanding, we are ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-04-2011 #1Just Joined!
- Join Date
- May 2011
- Posts
- 6
Init Sequence
Hi guys,
I am understanding the linux start up sequence and stuck at the following:
start_kernel() -> rest_init() -> kernel_init() -> do_basic_setup() -> do_initcalls()
As per my understanding, we are initializing all the subsystems in do_initcalls():
for (fn = __early_initcall_end; fn < __initcall_end; fn++)
do_one_initcall(*fn);
I could not find the definition of function pointers __early_initcall_end and __initcall_end.
Please help me by stating where are these funciton pointer definitions.
Thanks in advance!!
Regards,
Mandava
- 05-05-2011 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,141
Search the kernel code tree?
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 05-06-2011 #3Just Joined!
- Join Date
- May 2011
- Posts
- 6
I searched the symbols using Source Insight.. could not find.
Only clue I got is in vmlinux.lds.h
#define INITCALLS \
*(.initcallearly.init) \
VMLINUX_SYMBOL(__early_initcall_end) = .; \
*(.initcall0.init) \
*(.initcall0s.init) \
*(.initcall1.init) \
*(.initcall1s.init) \
*(.initcall2.init) \
*(.initcall2s.init) \
*(.initcall3.init) \
*(.initcall3s.init) \
*(.initcall4.init) \
*(.initcall4s.init) \
*(.initcall5.init) \
*(.initcall5s.init) \
*(.initcallrootfs.init) \
*(.initcall6.init) \
*(.initcall6s.init) \
*(.initcall7.init) \
*(.initcall7s.init)
Later how it is mapping to all subsystem init calls is the doubt.
From trace32 debugging, I could find that all subsystem init funciton pointers are in between __early_initcall_end and __initcall_end. Ex: bt_init(), bluetooth_power_init() etc.. etc...
But I would like to know how it is implemented in the code.


Reply With Quote
