Changeset 0dc2fec in mainline for kernel/arch/amd64/src/smp/ap.S
- Timestamp:
- 2016-05-22T19:19:43Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b272c67a
- Parents:
- 153c7a29 (diff), af2254ec (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/smp/ap.S
r153c7a29 r0dc2fec 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.