Ignore:
File:
1 edited

Legend:

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

    r8844e70 r0637ddb  
    3737#include <arch/mm/page.h>
    3838#include <arch/pm.h>
     39#include <arch/cpu.h>
     40#include <arch/context_struct.h>
    3941
    4042.section K_TEXT_START, "ax"
     
    6365        /* switch to protected mode */
    6466        movl %cr0, %eax
    65         orl $1, %eax
     67        orl $CR0_PE, %eax
    6668        movl %eax, %cr0
    6769        jmpl $KTEXT, $jump_to_kernel - BOOT_OFFSET + AP_BOOT_OFFSET
     
    7375        movw %ax, %es
    7476        movw %ax, %ss
    75         movl $KA2PA(ctx), %eax  /* KA2PA((uintptr_t) &ctx) */
    76         movl (%eax), %esp
    77         subl $0x80000000, %esp  /* KA2PA(ctx.sp) */
     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) */
    7880
    7981        /*
     
    8385        call map_kernel_pse
    8486       
    85         addl $0x80000000, %esp  /* PA2KA(ctx.sp) */
     87        addl $PA2KA(0), %esp            /* PA2KA(ctx.sp) */
    8688       
    8789        /* create the first stack frame */
Note: See TracChangeset for help on using the changeset viewer.