ia64/xen-unstable

view linux-2.6-xen-sparse/include/asm-i386/mach-default/mach_traps.h @ 11221:7c9d7fc3dce5

[HVM] Fix SMBIOS entry point copy destination.
Spotted by Xiaowei Yang <xiaowei.yang@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@localhost.localdomain
date Sat Aug 19 12:06:36 2006 +0100 (2006-08-19)
parents fd9b2c1bb577
children
line source
1 /*
2 * include/asm-i386/mach-default/mach_traps.h
3 *
4 * Machine specific NMI handling for generic.
5 * Split out from traps.c by Osamu Tomita <tomita@cinet.co.jp>
6 */
7 #ifndef _MACH_TRAPS_H
8 #define _MACH_TRAPS_H
10 #include <asm/mc146818rtc.h>
12 static inline void clear_mem_error(unsigned char reason)
13 {
14 reason = (reason & 0xf) | 4;
15 outb(reason, 0x61);
16 }
18 static inline void clear_io_check_error(unsigned char reason)
19 {
20 unsigned long i;
22 reason = (reason & 0xf) | 8;
23 outb(reason, 0x61);
24 i = 2000;
25 while (--i) udelay(1000);
26 reason &= ~8;
27 outb(reason, 0x61);
28 }
30 static inline unsigned char get_nmi_reason(void)
31 {
32 return inb(0x61);
33 }
35 static inline void reassert_nmi(void)
36 {
37 int old_reg = -1;
39 if (do_i_have_lock_cmos())
40 old_reg = current_lock_cmos_reg();
41 else
42 lock_cmos(0); /* register doesn't matter here */
43 outb(0x8f, 0x70);
44 inb(0x71); /* dummy */
45 outb(0x0f, 0x70);
46 inb(0x71); /* dummy */
47 if (old_reg >= 0)
48 outb(old_reg, 0x70);
49 else
50 unlock_cmos();
51 }
53 #endif /* !_MACH_TRAPS_H */