]> Joshua Wise's Git repositories - netwatch.git/blame - ich2/smi.c
Merge
[netwatch.git] / ich2 / smi.c
CommitLineData
85bc8ca6
JW
1#include <smi.h>
2#include <pci.h>
3#include <io.h>
4#include <stdint.h>
5
6uint16_t _get_PMBASE()
7{
8 return pci_read32(0, 0, 0, 0x40) & 0xFF80;
9}
10
11void smi_disable()
12{
13 unsigned short smi_en = _get_PMBASE() + 0x30;
14 outl(smi_en, inl(smi_en) & ~0x0001);
15}
16
17void smi_enable()
18{
19 unsigned short smi_en = _get_PMBASE() + 0x30;
20 outl(smi_en, inl(smi_en) | 0x0001);
21}
22
23unsigned long smi_status()
24{
25 unsigned short smi_sts = _get_PMBASE() + 0x34;
26 return inl(smi_sts);
27}
This page took 0.025734 seconds and 4 git commands to generate.