Changes in kernel/arch/amd64/src/boot/multiboot.S [36df4109:17af882] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/boot/multiboot.S
r36df4109 r17af882 29 29 */ 30 30 31 #include <abi/asmtool.h>32 31 #include <arch/boot/boot.h> 33 32 #include <arch/mm/page.h> … … 65 64 66 65 .align 4 66 .global multiboot_image_start 67 67 multiboot_header: 68 68 .long MULTIBOOT_HEADER_MAGIC … … 75 75 .long multiboot_image_start 76 76 77 SYMBOL(multiboot_image_start) 77 multiboot_image_start: 78 78 cli 79 79 cld … … 168 168 169 169 movl %cr4, %eax 170 orl $CR4_PAE, %eax170 btsl $5, %eax 171 171 movl %eax, %cr4 172 172 … … 176 176 177 177 /* Enable long mode */ 178 movl $ AMD_MSR_EFER, %ecx178 movl $EFER_MSR_NUM, %ecx 179 179 rdmsr /* read EFER */ 180 orl $AMD_LME, %eax/* set LME = 1 */180 btsl $AMD_LME_FLAG, %eax /* set LME = 1 */ 181 181 wrmsr 182 182 183 183 /* Enable paging to activate long mode (set CR0.PG = 1) */ 184 184 movl %cr0, %eax 185 orl $CR0_PG, %eax185 btsl $31, %eax 186 186 movl %eax, %cr0 187 187 … … 427 427 long_status $status_long 428 428 429 /* Call a md64_pre_main(multiboot_eax, multiboot_ebx) */429 /* Call arch_pre_main(multiboot_eax, multiboot_ebx) */ 430 430 movl multiboot_eax, %edi 431 431 movl multiboot_ebx, %esi 432 callq a md64_pre_main432 callq arch_pre_main 433 433 434 434 long_status $status_main … … 640 640 641 641 .align 4096 642 SYMBOL(ptl_0) 642 .global ptl_0 643 ptl_0: 643 644 .quad ptl_1 + (PTL_WRITABLE | PTL_PRESENT) 644 645 .fill 510, 8, 0 … … 647 648 .section K_DATA_START, "aw", @progbits 648 649 649 SYMBOL(bootstrap_idtr) 650 .global bootstrap_idtr 651 bootstrap_idtr: 650 652 .word 0 651 653 .long 0 652 654 653 SYMBOL(bootstrap_gdtr) 655 .global bootstrap_gdtr 656 bootstrap_gdtr: 654 657 .word GDT_SELECTOR(GDT_ITEMS) 655 658 .long KA2PA(gdt) 656 659 657 SYMBOL(multiboot_eax) 660 .global multiboot_eax 661 multiboot_eax: 658 662 .long 0 659 663 660 SYMBOL(multiboot_ebx) 664 .global multiboot_ebx 665 multiboot_ebx: 661 666 .long 0 662 667
Note:
See TracChangeset
for help on using the changeset viewer.