3 #include <video_defines.h>
6 #include <pci-bother.h>
8 #include "../net/net.h"
9 #include "vga-overlay.h"
11 unsigned int counter = 0;
12 unsigned long pcisave = 0;
13 unsigned char vgasave = 0;
24 sprintf(statstr, "NetWatch! %08x %08x", smi_status(), counter);
25 strblit(statstr, 0, 0, 0);
30 if (inl(0x840) & 0x1000)
47 extern void timer_handler(smi_event_t ev);
48 extern void kbc_handler(smi_event_t ev);
49 extern void gbl_rls_handler(smi_event_t ev);
51 void __firstrun_stub() {
53 /* Try really hard to shut up USB_LEGKEY. */
54 pci_write16(0, 31, 2, 0xC0, pci_read16(0, 31, 2, 0xC0));
55 pci_write16(0, 31, 2, 0xC0, 0);
56 pci_write16(0, 31, 4, 0xC0, pci_read16(0, 31, 4, 0xC0));
57 pci_write16(0, 31, 4, 0xC0, 0);
59 /* Turn on the SMIs we want */
62 smi_register_handler(SMI_EVENT_FAST_TIMER, timer_handler);
63 smi_enable_event(SMI_EVENT_FAST_TIMER);
65 smi_register_handler(SMI_EVENT_DEVTRAP_KBC, kbc_handler);
66 smi_enable_event(SMI_EVENT_DEVTRAP_KBC);
68 smi_register_handler(SMI_EVENT_GBL_RLS, gbl_rls_handler);
69 smi_enable_event(SMI_EVENT_GBL_RLS);