weiden@svn.reactos.org wrote:
make the initial kernel_stack large enough to have enough space for the fx savings area Modified: trunk/reactos/ntoskrnl/ke/i386/main_asm.S Modified: trunk/reactos/ntoskrnl/ke/i386/thread.c Modified: trunk/reactos/ntoskrnl/ke/main.c
*Modified: trunk/reactos/ntoskrnl/ke/i386/main_asm.S* --- trunk/reactos/ntoskrnl/ke/i386/main_asm.S 2006-01-14 19:45:50 UTC (rev 20863) +++ trunk/reactos/ntoskrnl/ke/i386/main_asm.S 2006-01-14 20:36:01 UTC (rev 20864) @@ -35,7 +35,7 @@ .m1: /* Load the initial kernel stack */ lea _kernel_stack, %eax
- add $0x1000, %eax
add $0x2000, %eax
and $0xFFFFE000, %eax add $(0x3000 - SIZEOF_FX_SAVE_AREA), %eax movl %eax, %esp
I think the change in all 3 files is wrong. There was a bug in main_asm.S. The code to align the stack must be:
.m1: lea _kernel_stack, %eax test $0xFFF, %eax jz .m2 and $0xFFFFF000, %eax add $0x1000, %eax .m2: add $(0x3000 - SIZEOF_FX_SAVE_AREA), %eax movl %eax, %esp
- Hartmut