Changeset d7ff048 in mainline for kernel/arch/ia32/src/smp/ap.S


Ignore:
Timestamp:
2011-10-08T13:08:53Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bf08ff0
Parents:
8367d1d (diff), 80099c19 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

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

    r8367d1d rd7ff048  
    2828#
    2929
    30 #
    31 # Init code for application processors.
    32 #
     30/*
     31 * Init code for application processors.
     32 */
    3333
    3434#include <arch/boot/boot.h>
     
    4646KDATA=16
    4747
    48 # This piece of code is real-mode and is meant to be aligned at 4K boundary.
    49 # The requirement for such an alignment comes from MP Specification's STARTUP IPI
    50 # requirements.
     48/*
     49 * This piece of code is real-mode and is meant to be aligned at 4K boundary.
     50 * The requirement for such an alignment comes from MP Specification's
     51 * STARTUP IPI requirements.
     52 */
    5153
    5254.align 4096
     
    5759        movw %ax, %ds
    5860
    59         lgdtl ap_gdtr           # initialize Global Descriptor Table register
     61        /* initialize Global Descriptor Table register */
     62        lgdtl ap_gdtr
    6063       
     64        /* switch to protected mode */
    6165        movl %cr0, %eax
    6266        orl $1, %eax
    63         movl %eax, %cr0                         # switch to protected mode
     67        movl %eax, %cr0
    6468        jmpl $KTEXT, $jump_to_kernel - BOOT_OFFSET + AP_BOOT_OFFSET
    6569       
     
    7074        movw %ax, %es
    7175        movw %ax, %ss
    72         movl $KA2PA(ctx), %eax                  # KA2PA((uintptr_t) &ctx)
     76        movl $KA2PA(ctx), %eax  /* KA2PA((uintptr_t) &ctx) */
    7377        movl (%eax), %esp
    74         subl $0x80000000, %esp                  # KA2PA(ctx.sp)
     78        subl $0x80000000, %esp  /* KA2PA(ctx.sp) */
    7579
    76         call map_kernel                                 # map kernel and turn paging on
     80        /*
     81         * Map kernel and turn paging on.
     82         * We assume that when using SMP, PSE is always available
     83         */
     84        call map_kernel_pse
    7785       
    78         addl $0x80000000, %esp                  # PA2KA(ctx.sp)
     86        addl $0x80000000, %esp  /*  PA2KA(ctx.sp) */
    7987       
    80         pushl $0                                # create the first stack frame
     88        /* create the first stack frame */
     89        pushl $0
    8190        movl %esp, %ebp
    8291
Note: See TracChangeset for help on using the changeset viewer.