Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/smp/ap.S

    r0637ddb r8844e70  
    3737#include <arch/mm/page.h>
    3838#include <arch/pm.h>
    39 #include <arch/cpu.h>
    40 #include <arch/context_struct.h>
    4139
    4240.section K_TEXT_START, "ax"
     
    6563        /* switch to protected mode */
    6664        movl %cr0, %eax
    67         orl $CR0_PE, %eax
     65        orl $1, %eax
    6866        movl %eax, %cr0
    6967        jmpl $KTEXT, $jump_to_kernel - BOOT_OFFSET + AP_BOOT_OFFSET
     
    7573        movw %ax, %es
    7674        movw %ax, %ss
    77         movl $KA2PA(ctx), %eax          /* KA2PA((uintptr_t) &ctx) */
    78         movl CONTEXT_OFFSET_SP(%eax), %esp
    79         leal KA2PA(0)(%esp), %esp       /* KA2PA(ctx.sp) */
     75        movl $KA2PA(ctx), %eax  /* KA2PA((uintptr_t) &ctx) */
     76        movl (%eax), %esp
     77        subl $0x80000000, %esp  /* KA2PA(ctx.sp) */
    8078
    8179        /*
     
    8583        call map_kernel_pse
    8684       
    87         addl $PA2KA(0), %esp            /* PA2KA(ctx.sp) */
     85        addl $0x80000000, %esp  /* PA2KA(ctx.sp) */
    8886       
    8987        /* create the first stack frame */
Note: See TracChangeset for help on using the changeset viewer.