I am trying to understand how does the stack pointer (for kernel itself) get setup in head.S. I am specifically looking at MIPS CPU. Here's the code fragment from arch/mips/kernel/head.S :
PTR_LA $28, init_thread_union
PTR_ADDIU sp, $28, _THREAD_SIZE - 32
set_saved_sp sp, t0, t1
PTR_SUBU sp, 4 * SZREG # init stack pointer
I looked at PPC implementation and it too seemed to be using init_thread_union and THREAD_SIZE for setting up sp.
Can somebody here explain what is going on here?
Thanks!
Looking for earth-friendly autos?
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.