Ignore:
Timestamp:
2016-05-05T13:02:20Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a0d9abcd
Parents:
811770c
Message:

Avoid even more magic numbers

File:
1 edited

Legend:

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

    r811770c r57c2a87  
    3535#include <genarch/multiboot/multiboot.h>
    3636#include <arch/cpuid.h>
     37#include <arch/cpu.h>
    3738
    3839#define START_STACK  (BOOT_OFFSET - BOOT_STACK_SIZE)
     
    166167        /* Paging features */
    167168        movl %cr4, %ecx
    168         orl $(1 << 4), %ecx      /* PSE on */
    169         andl $(~(1 << 5)), %ecx  /* PAE off */
     169        orl $CR4_PSE, %ecx      /* PSE on */
     170        andl $~CR4_PAE, %ecx    /* PAE off */
    170171        movl %ecx, %cr4
    171172       
     
    191192       
    192193        movl %cr0, %ebx
    193         orl $(1 << 31), %ebx  /* paging on */
     194        orl $CR0_PG, %ebx       /* paging on */
    194195        movl %ebx, %cr0
    195196        ret
     
    205206        /* Paging features */
    206207        movl %cr4, %ecx
    207         andl $(~(1 << 5)), %ecx  /* PAE off */
     208        andl $~CR4_PAE, %ecx  /* PAE off */
    208209        movl %ecx, %cr4
    209210       
     
    277278               
    278279                movl %cr0, %ebx
    279                 orl $(1 << 31), %ebx  /* paging on */
     280                orl $CR0_PG, %ebx  /* paging on */
    280281                movl %ebx, %cr0
    281282               
Note: See TracChangeset for help on using the changeset viewer.