mov $0x1BADD00D, %ecx
# Parameter: I/O port to set bit 2 of
- mov 4(%esp), %dx
+ mov 4(%esp), %edx
inl %dx, %eax
or $4, %eax
outl %eax, %dx
- # Count down for a while
- mov $0x10000, %edx
-loop:
- dec %edx
- jz loop
-
# Maybe SMM poked something?
mov %ecx, %eax
ret
#include <reg-82801b.h>
#include <string.h>
#include <stdint.h>
+#include <stdlib.h>
static uint16_t _get_PMBASE()
{
}
-extern unsigned int poke(short addr);
+extern unsigned int poke(unsigned long addr);
int main(int argc, char **argv)
{
perror("iopl");
return 1;
}
-
+
res = poke(_get_PMBASE() + 0x04);
printf("found %p\n", res);
}