Changes in kernel/arch/amd64/src/smp/ap.S [4928165:3b0f1b9a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/smp/ap.S
r4928165 r3b0f1b9a 39 39 #include <arch/cpu.h> 40 40 #include <arch/cpuid.h> 41 #include <arch/context_struct.h>42 41 43 42 .section K_TEXT_START, "ax" … … 59 58 60 59 movl %cr0, %eax 61 orl $ CR0_PE, %eax60 orl $1, %eax 62 61 movl %eax, %cr0 # switch to protected mode 63 62 jmpl $GDT_SELECTOR(KTEXT32_DES), $jump_to_kernel - BOOT_OFFSET + AP_BOOT_OFFSET … … 76 75 77 76 movl %cr4, %eax 78 orl $CR4_PAE, %eax77 btsl $5, %eax 79 78 movl %eax, %cr4 80 79 … … 83 82 84 83 # Enable long mode 85 movl $ AMD_MSR_EFER, %ecx # EFER MSR number84 movl $EFER_MSR_NUM, %ecx # EFER MSR number 86 85 rdmsr # Read EFER 87 orl $AMD_LME, %eax# Set LME=186 btsl $AMD_LME_FLAG, %eax # Set LME=1 88 87 wrmsr # Write EFER 89 88 90 89 # Enable paging to activate long mode (set CR0.PG = 1) 91 90 movl %cr0, %eax 92 orl $CR0_PG, %eax91 btsl $31, %eax 93 92 movl %eax, %cr0 94 93 … … 99 98 start64: 100 99 movabsq $ctx, %rsp 101 movq CONTEXT_OFFSET_SP(%rsp), %rsp100 movq (%rsp), %rsp 102 101 103 102 pushq $0
Note:
See TracChangeset
for help on using the changeset viewer.