]> Joshua Wise's Git repositories - netwatch.git/blame - aseg/firstrun.c
add a first cut at a SMI API -- not many features...
[netwatch.git] / aseg / firstrun.c
CommitLineData
e5d94488 1#include <io.h>
85bc8ca6 2#include <smi.h>
e5d94488
JP
3
4void __firstrun_start() {
5/*
6 puts("Current USB state is: ");
7 puthex(pci_read16(0, 31, 2, 0xC0));
8 puts(" ");
9 puthex(pci_read16(0, 31, 4, 0xC0));
10 puts("\n");
11 puts("Current SMI state is: ");
12 puthex(inl(0x830));
13 puts("\n");
14 puts("Current SMRAMC state is: ");
15 puthex(pci_read8(0, 0, 0, 0x70));
16 puts("\n");
17*/
18
19 /* Try really hard to shut up USB_LEGKEY. */
20 pci_write16(0, 31, 2, 0xC0, pci_read16(0, 31, 2, 0xC0));
21 pci_write16(0, 31, 2, 0xC0, 0);
22 pci_write16(0, 31, 4, 0xC0, pci_read16(0, 31, 4, 0xC0));
23 pci_write16(0, 31, 4, 0xC0, 0);
24
25 /* Turn on the SMIs we want */
85bc8ca6
JW
26 outb(0x830, inb(0x830) | 0x40);
27 smi_enable();
e5d94488
JP
28}
29
This page took 0.022861 seconds and 4 git commands to generate.