initial stack pointer setup (in head.S)

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

 



Hi,

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.

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux