Rev 1074 | Rev 1187 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1074 | Rev 1186 | ||
|---|---|---|---|
| Line 28... | Line 28... | ||
| 28 | */ |
28 | */ |
| 29 | 29 | ||
| 30 | #ifndef __ia32_ASM_H__ |
30 | #ifndef __ia32_ASM_H__ |
| 31 | #define __ia32_ASM_H__ |
31 | #define __ia32_ASM_H__ |
| 32 | 32 | ||
| - | 33 | #include <arch/pm.h> |
|
| 33 | #include <arch/types.h> |
34 | #include <arch/types.h> |
| 34 | #include <config.h> |
35 | #include <config.h> |
| 35 | 36 | ||
| 36 | extern __u32 interrupt_handler_size; |
37 | extern __u32 interrupt_handler_size; |
| 37 | 38 | ||
| Line 249... | Line 250... | ||
| 249 | static inline void invlpg(__address addr) |
250 | static inline void invlpg(__address addr) |
| 250 | { |
251 | { |
| 251 | __asm__ volatile ("invlpg %0\n" :: "m" (*(__native *)addr)); |
252 | __asm__ volatile ("invlpg %0\n" :: "m" (*(__native *)addr)); |
| 252 | } |
253 | } |
| 253 | 254 | ||
| - | 255 | /** Load GDTR register from memory. |
|
| - | 256 | * |
|
| - | 257 | * @param gdtr_reg Address of memory from where to load GDTR. |
|
| - | 258 | */ |
|
| - | 259 | static inline void gdtr_load(struct ptr_16_32 *gdtr_reg) |
|
| - | 260 | { |
|
| - | 261 | __asm__ volatile ("lgdt %0\n" : : "m" (*gdtr_reg)); |
|
| - | 262 | } |
|
| - | 263 | ||
| - | 264 | /** Store GDTR register to memory. |
|
| - | 265 | * |
|
| - | 266 | * @param gdtr_reg Address of memory to where to load GDTR. |
|
| - | 267 | */ |
|
| - | 268 | static inline void gdtr_store(struct ptr_16_32 *gdtr_reg) |
|
| - | 269 | { |
|
| - | 270 | __asm__ volatile ("sgdt %0\n" : : "m" (*gdtr_reg)); |
|
| - | 271 | } |
|
| - | 272 | ||
| - | 273 | /** Load IDTR register from memory. |
|
| - | 274 | * |
|
| - | 275 | * @param idtr_reg Address of memory from where to load IDTR. |
|
| - | 276 | */ |
|
| - | 277 | static inline void idtr_load(struct ptr_16_32 *idtr_reg) |
|
| - | 278 | { |
|
| - | 279 | __asm__ volatile ("lidt %0\n" : : "m" (*idtr_reg)); |
|
| - | 280 | } |
|
| - | 281 | ||
| - | 282 | /** Load TR from descriptor table. |
|
| - | 283 | * |
|
| - | 284 | * @param sel Selector specifying descriptor of TSS segment. |
|
| - | 285 | */ |
|
| - | 286 | static inline void tr_load(__u16 sel) |
|
| - | 287 | { |
|
| - | 288 | __asm__ volatile ("ltr %0" : : "r" (sel)); |
|
| - | 289 | } |
|
| - | 290 | ||
| 254 | #endif |
291 | #endif |