4 #include <reg-82801b.h>
5 #include "vga-overlay.h"
8 extern int _bss, _bssend;
10 void __firstrun_start() {
14 smram = smram_save_state();
15 smram_tseg_set_state(SMRAM_TSEG_OPEN);
17 for (bp = (void *)&_bss; (void *)bp < (void *)&_bssend; bp++)
20 dologf("NetWatch running");
22 /* Try really hard to shut up USB_LEGKEY. */
23 pci_write16(0, 31, 2, 0xC0, pci_read16(0, 31, 2, 0xC0));
24 pci_write16(0, 31, 2, 0xC0, 0);
25 pci_write16(0, 31, 4, 0xC0, pci_read16(0, 31, 4, 0xC0));
26 pci_write16(0, 31, 4, 0xC0, 0);
28 /* Turn on the SMIs we want */
29 outb(0x830, inb(0x830) | ICH2_SMI_EN_SWSMI_TMR_EN);
30 outb(0x848, ICH2_DEVTRAP_EN_KBC_TRP_EN);
33 smram_restore_state(smram);