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