]> Joshua Wise's Git repositories - netwatch.git/blame_incremental - tools/poke-rls.c
Merge nyus.joshuawise.com:/storage/git/netwatch
[netwatch.git] / tools / poke-rls.c
... / ...
CommitLineData
1#include <sys/io.h>
2#include <reg-82801b.h>
3#include <string.h>
4#include <stdint.h>
5
6static uint16_t _get_PMBASE()
7{
8 static long pmbase = -1;
9
10 if (pmbase == -1)
11 pmbase = pci_read32(ICH2_LPC_BUS, ICH2_LPC_DEV, ICH2_LPC_FN, ICH2_LPC_PCI_PMBASE) & ICH2_PMBASE_MASK;
12
13 return pmbase;
14}
15
16
17extern unsigned int poke(short addr);
18
19int main(int argc, char **argv)
20{
21 unsigned int res;
22
23 if (iopl(3) < 0)
24 {
25 perror("iopl");
26 return 1;
27 }
28
29 res = poke(_get_PMBASE() + 0x04);
30 printf("found %p\n", res);
31}
This page took 0.025129 seconds and 4 git commands to generate.