Changes in kernel/arch/amd64/include/arch/cpu.h [1a5eca4:57c2a87] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/arch/cpu.h
r1a5eca4 r57c2a87 36 36 #define KERN_amd64_CPU_H_ 37 37 38 #define RFLAGS_CF (1 << 0) 39 #define RFLAGS_PF (1 << 2) 40 #define RFLAGS_AF (1 << 4) 41 #define RFLAGS_ZF (1 << 6) 42 #define RFLAGS_SF (1 << 7) 43 #define RFLAGS_TF (1 << 8) 44 #define RFLAGS_IF (1 << 9) 45 #define RFLAGS_DF (1 << 10) 46 #define RFLAGS_OF (1 << 11) 47 #define RFLAGS_NT (1 << 14) 48 #define RFLAGS_RF (1 << 16) 38 #define RFLAGS_CF (1 << 0) 39 #define RFLAGS_PF (1 << 2) 40 #define RFLAGS_AF (1 << 4) 41 #define RFLAGS_ZF (1 << 6) 42 #define RFLAGS_SF (1 << 7) 43 #define RFLAGS_TF (1 << 8) 44 #define RFLAGS_IF (1 << 9) 45 #define RFLAGS_DF (1 << 10) 46 #define RFLAGS_OF (1 << 11) 47 #define RFLAGS_IOPL (3 << 12) 48 #define RFLAGS_NT (1 << 14) 49 #define RFLAGS_RF (1 << 16) 50 #define RFLAGS_ID (1 << 21) 49 51 50 #define EFER_MSR_NUM 0xc0000080 51 #define AMD_SCE_FLAG 0 52 #define AMD_LME_FLAG 8 53 #define AMD_LMA_FLAG 10 54 #define AMD_FFXSR_FLAG 14 55 #define AMD_NXE_FLAG 11 52 #define CR0_PE (1 << 0) 53 #define CR0_MP (1 << 1) 54 #define CR0_EM (1 << 2) 55 #define CR0_TS (1 << 3) 56 #define CR0_AM (1 << 18) 57 #define CR0_PG (1 << 31) 58 59 #define CR4_PAE (1 << 5) 60 #define CR4_OSFXSR (1 << 9) 61 62 /* EFER bits */ 63 #define AMD_SCE (1 << 0) 64 #define AMD_LME (1 << 8) 65 #define AMD_LMA (1 << 10) 66 #define AMD_NXE (1 << 11) 67 #define AMD_FFXSR (1 << 14) 68 69 #define AMD_APIC_BASE_GE (1 << 11) 56 70 57 71 /* MSR registers */ 72 #define AMD_MSR_APIC_BASE 0x0000001b 73 #define AMD_MSR_EFER 0xc0000080 58 74 #define AMD_MSR_STAR 0xc0000081 59 75 #define AMD_MSR_LSTAR 0xc0000082 … … 85 101 }; 86 102 87 extern void set_efer_flag(int flag);88 extern uint64_t read_efer_flag(void);89 103 void cpu_setup_fpu(void); 90 104
Note:
See TracChangeset
for help on using the changeset viewer.