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