Changeset 0f17bff in mainline for kernel/arch/ia32/include/arch/cpu.h


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/include/arch/cpu.h

    r4b0206c r0f17bff  
    3636#define KERN_ia32_CPU_H_
    3737
    38 #define EFLAGS_IF       (1 << 9)
    39 #define EFLAGS_DF       (1 << 10)
    40 #define EFLAGS_NT       (1 << 14)
    41 #define EFLAGS_RF       (1 << 16)
     38#define EFLAGS_IF       (1 << 9)
     39#define EFLAGS_DF       (1 << 10)
     40#define EFLAGS_IOPL     (3 << 12)
     41#define EFLAGS_NT       (1 << 14)
     42#define EFLAGS_RF       (1 << 16)
    4243
    43 #define CR4_OSFXSR_MASK      (1 << 9)
    44 #define CR4_OSXMMEXCPT_MASK  (1 << 10)
     44#define CR0_AM          (1 << 18)
     45#define CR0_NW          (1 << 29)
     46#define CR0_CD          (1 << 30)
     47#define CR0_PG          (1 << 31)
     48
     49#define CR4_OSFXSR_MASK         (1 << 9)
     50#define CR4_OSXMMEXCPT_MASK     (1 << 10)
     51
     52#define IA32_APIC_BASE_GE       (1 << 11)
     53
     54#define IA32_MSR_APIC_BASE      0x01b
    4555
    4656/* Support for SYSENTER and SYSEXIT */
    47 #define IA32_MSR_SYSENTER_CS   0x174U
    48 #define IA32_MSR_SYSENTER_ESP  0x175U
    49 #define IA32_MSR_SYSENTER_EIP  0x176U
     57#define IA32_MSR_SYSENTER_CS    0x174
     58#define IA32_MSR_SYSENTER_ESP   0x175
     59#define IA32_MSR_SYSENTER_EIP   0x176
    5060
    5161#ifndef __ASM__
Note: See TracChangeset for help on using the changeset viewer.