Rev 2071 | Rev 2089 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2071 | Rev 2082 | ||
---|---|---|---|
Line 145... | Line 145... | ||
145 | 145 | ||
146 | 146 | ||
147 | /* Clean IOPL(12,13) and NT(14) flags in EFLAGS register */ |
147 | /* Clean IOPL(12,13) and NT(14) flags in EFLAGS register */ |
148 | static void clean_IOPL_NT_flags(void) |
148 | static void clean_IOPL_NT_flags(void) |
149 | { |
149 | { |
150 | __asm__ volatile ( |
150 | asm volatile ( |
151 | "pushfl\n" |
151 | "pushfl\n" |
152 | "pop %%eax\n" |
152 | "pop %%eax\n" |
153 | "and $0xffff8fff, %%eax\n" |
153 | "and $0xffff8fff, %%eax\n" |
154 | "push %%eax\n" |
154 | "push %%eax\n" |
155 | "popfl\n" |
155 | "popfl\n" |
Line 158... | Line 158... | ||
158 | } |
158 | } |
159 | 159 | ||
160 | /* Clean AM(18) flag in CR0 register */ |
160 | /* Clean AM(18) flag in CR0 register */ |
161 | static void clean_AM_flag(void) |
161 | static void clean_AM_flag(void) |
162 | { |
162 | { |
163 | __asm__ volatile ( |
163 | asm volatile ( |
164 | "mov %%cr0, %%eax\n" |
164 | "mov %%cr0, %%eax\n" |
165 | "and $0xfffbffff, %%eax\n" |
165 | "and $0xfffbffff, %%eax\n" |
166 | "mov %%eax, %%cr0\n" |
166 | "mov %%eax, %%cr0\n" |
167 | : : : "eax" |
167 | : : : "eax" |
168 | ); |
168 | ); |