hello,
arch/x86/kernel/head_32.S:
#define pa(X) ((X) - __PAGE_OFFSET)
...
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
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
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies