]> Joshua Wise's Git repositories - netwatch.git/blob - aseg/firstrun.c
add a first cut at a SMI API -- not many features...
[netwatch.git] / aseg / firstrun.c
1 #include <io.h>
2 #include <smi.h>
3
4 void __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 */
26         outb(0x830, inb(0x830) | 0x40);
27         smi_enable();
28 }
29
This page took 0.027198 seconds and 4 git commands to generate.