Re: x86/kernel/head_32.S

2014-12-05 Thread Valdis . Kletnieks
On Fri, 05 Dec 2014 17:50:40 +0800, 孙建希 said: > > 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`? >From the commit message: "This retains start_stack as a virtual

x86/kernel/head_32.S

2014-12-05 Thread 孙建希
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