Ignore:
File:
1 edited

Legend:

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

    r0637ddb r9d58539  
    3232 */
    3333
    34 #include <abi/asmtool.h>
    3534#include <arch/boot/boot.h>
    3635#include <arch/boot/memmap.h>
    3736#include <arch/mm/page.h>
    3837#include <arch/pm.h>
    39 #include <arch/cpu.h>
    40 #include <arch/context_struct.h>
    4138
    4239.section K_TEXT_START, "ax"
    4340
    4441#ifdef CONFIG_SMP
     42
     43.global unmapped_ap_boot
    4544
    4645KTEXT=8
     
    5453
    5554.align 4096
    56 SYMBOL(unmapped_ap_boot)
     55unmapped_ap_boot:
    5756.code16
    5857        cli
     
    6564        /* switch to protected mode */
    6665        movl %cr0, %eax
    67         orl $CR0_PE, %eax
     66        orl $1, %eax
    6867        movl %eax, %cr0
    6968        jmpl $KTEXT, $jump_to_kernel - BOOT_OFFSET + AP_BOOT_OFFSET
     
    7574        movw %ax, %es
    7675        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) */
     76        movl $KA2PA(ctx), %eax  /* KA2PA((uintptr_t) &ctx) */
     77        movl (%eax), %esp
     78        subl $0x80000000, %esp  /* KA2PA(ctx.sp) */
    8079
    8180        /*
     
    8584        call map_kernel_pse
    8685       
    87         addl $PA2KA(0), %esp            /* PA2KA(ctx.sp) */
     86        addl $0x80000000, %esp  /* PA2KA(ctx.sp) */
    8887       
    8988        /* create the first stack frame */
     
    10099#ifdef CONFIG_SMP
    101100
    102 SYMBOL(unmapped_ap_gdtr)
     101.global unmapped_ap_gdtr
     102
     103unmapped_ap_gdtr:
    103104        .word 0
    104105        .long 0
Note: See TracChangeset for help on using the changeset viewer.