x86/kernel/head_32.S

孙建希 ycsunjane at gmail.com
Fri Dec 5 04:50:40 EST 2014


hello,

arch/x86/kernel/head_32.S:

#define pa(X) ((X) - __PAGE_OFFSET)

__HEAD  ENTRY(startup_32)  + movl pa(stack_start),%ecx...
+ movl %eax,%ss  2:  + leal -__PAGE_OFFSET(%ecx),%esp

I am confused by `leal -__PAGE_OFFSET(%ecx),%esp`.
`pa(stack_start)` have convert `stack_start` to physicall address.
why we need `-__PAGE_OFFSET(%ecx)` instead of `%ecx`?


I have found the commit in github:

https://github.com/torvalds/linux/commit/11d4c3f9b671720e80353dd7e433ff2bf65e9500#diff-3910cf85e24534430413b7133160d0ba
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20141205/91553d2b/attachment.html 


More information about the Kernelnewbies mailing list