3 #include <video_defines.h>
8 #include "vga-overlay.h"
10 unsigned int counter = 0;
11 unsigned long pcisave;
12 unsigned char vgasave;
17 static int curdev = 0; /* 0 if kbd, 1 if mouse */
28 strcpy(s, "READxxxxxxxxxxxxxxxx");
30 b = inb(cts & 0xFFFF);
32 if ((cts & 0xFFFF) == 0x64)
33 curdev = (b & 0x20) ? 1 : 0;
34 if ((curdev == 0) && ((cts & 0xFFFF) == 0x60) && (b == 0x01))
37 *(unsigned char*)0xAFFD0 /* EAX */ = b;
44 strcpy(s, "WRITxxxxxxxxxxxxxxxx");
45 b = *(unsigned char*)0xAFFD0 /* EAX */;
49 outb(cts & 0xFFFF, b);
53 dolog("Unhandled PCI cycle");
70 dolog("NetWatch running...");
74 outb(0x80, (counter & 0xFF));
76 strcpy(thestr, "15-412! xxxxxxxx xxxxxxxx");
77 tohex(thestr + 8, inl(0x0834));
78 tohex(thestr + 17, counter);
79 strblit(thestr, 0, 0);
81 if (inl(0x834) & 0x20)
82 dolog("Warning: unhandled APM access");
83 if (inl(0x834) & 0x1000)
85 if (inl(0x844) & 0x1000) /* devact_sts */
88 outl(0x844, 0x1000); /* ack it */
91 if (inl(0x834) & 0x4000)
92 dolog("Long periodic timer");
93 if (inl(0x840) & 0x1000)
99 if (inl(0x834) & ~(0x4160))
102 strcpy(s, "Unknown: xxxxxxxx");
103 tohex(s + 9, inl(0x834) & ~(0x140));
110 outl(0xCF8, pcisave);
111 outb(0x3D4, vgasave);
114 outl(0x834, /*0x40*/0xFFFF); // ack the periodic IRQ
115 outb(0x830, (inb(0x830) | 0x2) & ~0x40);
116 outb(0x830, inb(0x830) | 0x40);