Changes in kernel/arch/ia32/src/smp/ap.S [bac86377:e0e00d7] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/smp/ap.S
rbac86377 re0e00d7 28 28 # 29 29 30 # 31 #Init code for application processors.32 # 30 /* 31 * Init code for application processors. 32 */ 33 33 34 34 #include <arch/boot/boot.h> … … 46 46 KDATA=16 47 47 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 */ 51 53 52 54 .align 4096 … … 57 59 movw %ax, %ds 58 60 59 lgdtl ap_gdtr # initialize Global Descriptor Table register 61 /* initialize Global Descriptor Table register */ 62 lgdtl ap_gdtr 60 63 64 /* switch to protected mode */ 61 65 movl %cr0, %eax 62 66 orl $1, %eax 63 movl %eax, %cr0 # switch to protected mode67 movl %eax, %cr0 64 68 jmpl $KTEXT, $jump_to_kernel - BOOT_OFFSET + AP_BOOT_OFFSET 65 69 … … 70 74 movw %ax, %es 71 75 movw %ax, %ss 72 movl $KA2PA(ctx), %eax # KA2PA((uintptr_t) &ctx)76 movl $KA2PA(ctx), %eax /* KA2PA((uintptr_t) &ctx) */ 73 77 movl (%eax), %esp 74 subl $0x80000000, %esp # KA2PA(ctx.sp)78 subl $0x80000000, %esp /* KA2PA(ctx.sp) */ 75 79 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 77 85 78 addl $0x80000000, %esp # PA2KA(ctx.sp)86 addl $0x80000000, %esp /* PA2KA(ctx.sp) */ 79 87 80 pushl $0 # create the first stack frame 88 /* create the first stack frame */ 89 pushl $0 81 90 movl %esp, %ebp 82 91
Note:
See TracChangeset
for help on using the changeset viewer.