Changeset 0f17bff in mainline for kernel/arch/ia32/src/asm.S


Ignore:
Timestamp:
2016-05-05T08:34:45Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
811770c
Parents:
4b0206c
Message:

Replace magic numbers with macros

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/asm.S

    r4b0206c r0f17bff  
    3636#include <arch/mm/page.h>
    3737#include <arch/istate_struct.h>
     38#include <arch/smp/apic.h>
    3839
    3940.text
     
    110111FUNCTION_BEGIN(paging_on)
    111112        movl %cr0, %edx
    112         orl $(1 << 31), %edx  /* paging on */
     113        orl $CR0_PG, %edx  /* paging on */
    113114       
    114115        /* Clear Cache Disable and not Write Though */
    115         andl $~((1 << 30) | (1 << 29)), %edx
     116        andl $~(CR0_CD | CR0_NW), %edx
    116117        movl %edx, %cr0
    117118        jmp 0f
     
    127128 */
    128129FUNCTION_BEGIN(enable_l_apic_in_msr)
    129         movl $0x1b, %ecx
     130        movl $IA32_MSR_APIC_BASE, %ecx
    130131        rdmsr
    131         orl $(1 << 11), %eax
    132         orl $(0xfee00000), %eax
     132        orl $(L_APIC_BASE | IA32_APIC_BASE_GE), %eax
    133133        wrmsr
    134134        ret
Note: See TracChangeset for help on using the changeset viewer.