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