Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/boot/multiboot.S

    r36df4109 r17af882  
    2929 */
    3030
    31 #include <abi/asmtool.h>
    3231#include <arch/boot/boot.h>
    3332#include <arch/mm/page.h>
     
    6564
    6665.align 4
     66.global multiboot_image_start
    6767multiboot_header:
    6868        .long MULTIBOOT_HEADER_MAGIC
     
    7575        .long multiboot_image_start
    7676
    77 SYMBOL(multiboot_image_start)
     77multiboot_image_start:
    7878        cli
    7979        cld
     
    168168       
    169169        movl %cr4, %eax
    170         orl $CR4_PAE, %eax
     170        btsl $5, %eax
    171171        movl %eax, %cr4
    172172       
     
    176176       
    177177        /* Enable long mode */
    178         movl $AMD_MSR_EFER, %ecx
     178        movl $EFER_MSR_NUM, %ecx
    179179        rdmsr                     /* read EFER */
    180         orl $AMD_LME, %eax        /* set LME = 1 */
     180        btsl $AMD_LME_FLAG, %eax  /* set LME = 1 */
    181181        wrmsr
    182182       
    183183        /* Enable paging to activate long mode (set CR0.PG = 1) */
    184184        movl %cr0, %eax
    185         orl $CR0_PG, %eax
     185        btsl $31, %eax
    186186        movl %eax, %cr0
    187187       
     
    427427        long_status $status_long
    428428       
    429         /* Call amd64_pre_main(multiboot_eax, multiboot_ebx) */
     429        /* Call arch_pre_main(multiboot_eax, multiboot_ebx) */
    430430        movl multiboot_eax, %edi
    431431        movl multiboot_ebx, %esi
    432         callq amd64_pre_main
     432        callq arch_pre_main
    433433
    434434        long_status $status_main
     
    640640
    641641.align 4096
    642 SYMBOL(ptl_0)
     642.global ptl_0
     643ptl_0:
    643644        .quad ptl_1 + (PTL_WRITABLE | PTL_PRESENT)
    644645        .fill 510, 8, 0
     
    647648.section K_DATA_START, "aw", @progbits
    648649
    649 SYMBOL(bootstrap_idtr)
     650.global bootstrap_idtr
     651bootstrap_idtr:
    650652        .word 0
    651653        .long 0
    652654
    653 SYMBOL(bootstrap_gdtr)
     655.global bootstrap_gdtr
     656bootstrap_gdtr:
    654657        .word GDT_SELECTOR(GDT_ITEMS)
    655658        .long KA2PA(gdt)
    656659
    657 SYMBOL(multiboot_eax)
     660.global multiboot_eax
     661multiboot_eax:
    658662        .long 0
    659663
    660 SYMBOL(multiboot_ebx)
     664.global multiboot_ebx
     665multiboot_ebx:
    661666        .long 0
    662667
Note: See TracChangeset for help on using the changeset viewer.