Ignore:
File:
1 edited

Legend:

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

    r9d58539 r0637ddb  
    3232 */
    3333
     34#include <abi/asmtool.h>
    3435#include <arch/boot/boot.h>
    3536#include <arch/boot/memmap.h>
    3637#include <arch/mm/page.h>
    3738#include <arch/pm.h>
     39#include <arch/cpu.h>
     40#include <arch/context_struct.h>
    3841
    3942.section K_TEXT_START, "ax"
    4043
    4144#ifdef CONFIG_SMP
    42 
    43 .global unmapped_ap_boot
    4445
    4546KTEXT=8
     
    5354
    5455.align 4096
    55 unmapped_ap_boot:
     56SYMBOL(unmapped_ap_boot)
    5657.code16
    5758        cli
     
    6465        /* switch to protected mode */
    6566        movl %cr0, %eax
    66         orl $1, %eax
     67        orl $CR0_PE, %eax
    6768        movl %eax, %cr0
    6869        jmpl $KTEXT, $jump_to_kernel - BOOT_OFFSET + AP_BOOT_OFFSET
     
    7475        movw %ax, %es
    7576        movw %ax, %ss
    76         movl $KA2PA(ctx), %eax  /* KA2PA((uintptr_t) &ctx) */
    77         movl (%eax), %esp
    78         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) */
    7980
    8081        /*
     
    8485        call map_kernel_pse
    8586       
    86         addl $0x80000000, %esp  /* PA2KA(ctx.sp) */
     87        addl $PA2KA(0), %esp            /* PA2KA(ctx.sp) */
    8788       
    8889        /* create the first stack frame */
     
    99100#ifdef CONFIG_SMP
    100101
    101 .global unmapped_ap_gdtr
    102 
    103 unmapped_ap_gdtr:
     102SYMBOL(unmapped_ap_gdtr)
    104103        .word 0
    105104        .long 0
Note: See TracChangeset for help on using the changeset viewer.