3 #include <video_defines.h>
6 #include <pci-bother.h>
10 #include "../net/net.h"
11 #include "vga-overlay.h"
13 unsigned int counter = 0;
14 unsigned long pcisave = 0;
15 unsigned char vgasave = 0;
28 fb->getvmode(fb->priv);
31 if (!fb || fb->curmode.text)
33 sprintf(statstr, "NetWatch! %08x %08x", smi_status(), counter);
34 strblit(statstr, 0, 0, 0);
39 if (inl(0x840) & 0x1000)
56 extern void timer_handler(smi_event_t ev);
57 extern void kbc_handler(smi_event_t ev);
58 extern void gbl_rls_handler(smi_event_t ev);
60 void __firstrun_stub() {
62 /* Try really hard to shut up USB_LEGKEY. */
63 pci_write16(0, 31, 2, 0xC0, pci_read16(0, 31, 2, 0xC0));
64 pci_write16(0, 31, 2, 0xC0, 0);
65 pci_write16(0, 31, 4, 0xC0, pci_read16(0, 31, 4, 0xC0));
66 pci_write16(0, 31, 4, 0xC0, 0);
68 /* Turn on the SMIs we want */
71 smi_register_handler(SMI_EVENT_FAST_TIMER, timer_handler);
72 smi_enable_event(SMI_EVENT_FAST_TIMER);
74 smi_register_handler(SMI_EVENT_DEVTRAP_KBC, kbc_handler);
75 smi_enable_event(SMI_EVENT_DEVTRAP_KBC);
77 smi_register_handler(SMI_EVENT_GBL_RLS, gbl_rls_handler);
78 smi_enable_event(SMI_EVENT_GBL_RLS);