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