]>
Commit | Line | Data |
---|---|---|
1 | #include <io.h> | |
2 | #include <smi.h> | |
3 | #include <pci.h> | |
4 | ||
5 | void __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 |