4 #define CR4_PSE36 ( 1UL << 4 )
5 #define CR4_OSXMMEXCPT ( 1UL << 10 )
6 #define CR4_OSFXSR ( 1UL << 9 )
7 #define CR4_PCIDE ( 1UL << 17 )
8 #define CR4_PGE ( 1UL << 7 )
9 #define CR4_LA57 ( 1UL << 12 )
11 #define CR0_PG ( 1UL << 31 )
12 #define CR0_WP ( 1UL << 16 )
13 #define CR0_EM ( 1UL << 2 )
14 #define CR0_MP ( 1UL << 1 )
16 #ifdef CONFIG_ARCH_X86_64
18 #define crx_addflag(crx, flag) \
20 "movq %%" #crx ", %%rax\n" \
22 "movq %%rax, %%" #crx "\n" \
27 #define crx_rmflag(crx, flag) \
29 "movq %%" #crx ", %%rax\n" \
31 "movq %%rax, %%" #crx "\n" \
38 #define crx_addflag(crx, flag) \
40 "movl %%" #crx ", %%eax\n" \
42 "movl %%eax, %%" #crx "\n" \
47 #define crx_rmflag(crx, flag) \
49 "movl %%" #crx ", %%eax\n" \
51 "movl %%eax, %%" #crx "\n" \
59 cr4_setfeature(unsigned long feature)
61 crx_addflag(cr4, feature);
65 cr0_setfeature(unsigned long feature)
67 crx_addflag(cr0, feature);
71 cr0_unsetfeature(unsigned long feature)
73 crx_rmflag(cr0, feature);
76 #endif /* __LUNAIX_CR4_H */