3 * NetWatch system management mode administration console
5 * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
6 * This program is free software; you can redistribute and/or modify it under
7 * the terms found in the file LICENSE in the root of this source tree.
14 #include <reg-82801b.h>
16 #include "vga-overlay.h"
19 #include "../net/net.h"
22 extern int _bss, _bssend;
24 extern void timer_handler(smi_event_t ev);
25 extern void kbc_handler(smi_event_t ev);
26 extern void gbl_rls_handler(smi_event_t ev);
28 extern pci_driver_t *drivers[];
32 pci_driver_t **driver;
34 smram = smram_save_state();
35 smram_tseg_set_state(SMRAM_TSEG_OPEN);
37 outputf("NetWatch running");
39 /* Turn on the SMIs we want */
46 /* After everything is initialized, load drivers. */
47 for (driver = drivers; *driver; driver++)
49 outputf("Probing driver: %s", (*driver)->name);
50 if (pci_probe_driver(*driver))
51 output("Found a card");
53 outputf("Driver probe complete");
58 smi_register_handler(SMI_EVENT_FAST_TIMER, timer_handler);
59 smi_enable_event(SMI_EVENT_FAST_TIMER);
61 smi_register_handler(SMI_EVENT_DEVTRAP_KBC, kbc_handler);
62 smi_enable_event(SMI_EVENT_DEVTRAP_KBC);
64 smi_register_handler(SMI_EVENT_GBL_RLS, gbl_rls_handler);
65 smi_enable_event(SMI_EVENT_GBL_RLS);
71 smram_restore_state(smram);