]> Joshua Wise's Git repositories - netwatch.git/blame - aseg-paging/firstrun.c
Merge branch 'master' of /storage/git/netwatch
[netwatch.git] / aseg-paging / firstrun.c
CommitLineData
9e2a82e4
JP
1#include <io.h>
2#include <smi.h>
3#include <pci.h>
4#include <reg-82801b.h>
5#include <output.h>
6#include "vga-overlay.h"
7#include <smram.h>
8#include "../net/net.h"
9
10extern int _bss, _bssend;
11
12extern void timer_handler(smi_event_t ev);
13extern void kbc_handler(smi_event_t ev);
14extern void gbl_rls_handler(smi_event_t ev);
15
16void __firstrun_start() {
17 unsigned char *bp;
18 smram_state_t smram;
19
20 smram = smram_save_state();
21 smram_tseg_set_state(SMRAM_TSEG_OPEN);
22/*
23 for (bp = (void *)&_bss; (void *)bp < (void *)&_bssend; bp++)
24 *bp = 0;
25
26 vga_flush_imm(0);
27*/
28
29 outputf("NetWatch running");
30
31 /* Try really hard to shut up USB_LEGKEY. */
32 pci_write16(0, 31, 2, 0xC0, pci_read16(0, 31, 2, 0xC0));
33 pci_write16(0, 31, 2, 0xC0, 0);
34 pci_write16(0, 31, 4, 0xC0, pci_read16(0, 31, 4, 0xC0));
35 pci_write16(0, 31, 4, 0xC0, 0);
36
37 /* Turn on the SMIs we want */
38 smi_disable();
39 /*
40
41 eth_init();
42
43 smi_register_handler(SMI_EVENT_FAST_TIMER, timer_handler);
44 smi_enable_event(SMI_EVENT_FAST_TIMER);
45
46 smi_register_handler(SMI_EVENT_DEVTRAP_KBC, kbc_handler);
47 smi_enable_event(SMI_EVENT_DEVTRAP_KBC);
48
49 smi_register_handler(SMI_EVENT_GBL_RLS, gbl_rls_handler);
50 smi_enable_event(SMI_EVENT_GBL_RLS);
51*/
52 smi_enable();
53
54 vga_flush_imm(1);
55
56 smram_restore_state(smram);
57}
58
This page took 0.023529 seconds and 4 git commands to generate.