Changes in kernel/arch/amd64/src/boot/multiboot2.S [36df4109:17af882] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/boot/multiboot2.S
r36df4109 r17af882 27 27 */ 28 28 29 #include <abi/asmtool.h>30 29 #include <arch/boot/boot.h> 31 30 #include <arch/mm/page.h> … … 42 41 43 42 .align 8 43 .global multiboot2_image_start 44 44 multiboot2_header_start: 45 45 .long MULTIBOOT2_HEADER_MAGIC … … 49 49 50 50 /* Information request tag */ 51 .align 852 51 tag_info_req_start: 53 52 .word MULTIBOOT2_TAG_INFO_REQ … … 62 61 63 62 /* Address tag */ 64 .align 865 63 tag_address_start: 66 64 .word MULTIBOOT2_TAG_ADDRESS … … 74 72 75 73 /* Entry address tag */ 76 .align 877 74 tag_entry_address_start: 78 75 .word MULTIBOOT2_TAG_ENTRY_ADDRESS … … 83 80 84 81 /* Flags tag */ 85 .align 886 82 tag_flags_start: 87 83 .word MULTIBOOT2_TAG_FLAGS … … 93 89 #ifdef CONFIG_FB 94 90 /* Framebuffer tag */ 95 .align 896 91 tag_framebuffer_start: 97 92 .word MULTIBOOT2_TAG_FRAMEBUFFER … … 105 100 106 101 /* Module alignment tag */ 107 .align 8108 102 tag_module_align_start: 109 103 .word MULTIBOOT2_TAG_MODULE_ALIGN … … 114 108 115 109 /* Tag terminator */ 116 .align 8117 110 tag_terminator_start: 118 111 .word MULTIBOOT2_TAG_TERMINATOR … … 122 115 multiboot2_header_end: 123 116 124 SYMBOL(multiboot2_image_start) 117 multiboot2_image_start: 125 118 cli 126 119 cld … … 209 202 210 203 movl %cr4, %eax 211 orl $CR4_PAE, %eax204 btsl $5, %eax 212 205 movl %eax, %cr4 213 206 … … 217 210 218 211 /* Enable long mode */ 219 movl $ AMD_MSR_EFER, %ecx212 movl $EFER_MSR_NUM, %ecx 220 213 rdmsr /* read EFER */ 221 orl $AMD_LME, %eax/* set LME = 1 */214 btsl $AMD_LME_FLAG, %eax /* set LME = 1 */ 222 215 wrmsr 223 216 224 217 /* Enable paging to activate long mode (set CR0.PG = 1) */ 225 218 movl %cr0, %eax 226 orl $CR0_PG, %eax219 btsl $31, %eax 227 220 movl %eax, %cr0 228 221 … … 250 243 movq %rsp, %rbp 251 244 252 /* Call a md64_pre_main(multiboot_eax, multiboot_ebx) */245 /* Call arch_pre_main(multiboot_eax, multiboot_ebx) */ 253 246 movl multiboot_eax, %edi 254 247 movl multiboot_ebx, %esi 255 callq a md64_pre_main248 callq arch_pre_main 256 249 257 250 /* Call main_bsp() */
Note:
See TracChangeset
for help on using the changeset viewer.