understanding head.S

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,
I was reading the boot code for MIPS.
in head.S file before jumping to 'start_kernel' it calculate the stack
pointer address as follow:

"
	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
"

Can anyone please explains me this 4 lines of code?
Why ' _THREAD_SIZE - 32' is added in 'sp' ?
What 'set_saved_sp' will do ?
and then why we subtract '4 * SZREG' from 'sp' ?

Please hep me to understand this code better.

Thanks,
Chetan Nanda


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux