]> Joshua Wise's Git repositories - netwatch.git/commitdiff
Convert the poker to not bother to wait.
authorJoshua Wise <joshua@rebirth.joshuawise.com>
Fri, 26 Sep 2008 01:52:52 +0000 (21:52 -0400)
committerJoshua Wise <joshua@rebirth.joshuawise.com>
Fri, 26 Sep 2008 01:52:52 +0000 (21:52 -0400)
tools/poke-rls-asm.S
tools/poke-rls.c

index ee4485494a08760134fee70b3f26fe79b3d06b46..980b4bf48dbae1824f3c906abe4ed2e37d08284e 100644 (file)
@@ -4,17 +4,11 @@ poke:
        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
index c6db7bccdde5223c10d113e331a307c816803512..01de181bf1e5497ca8e248a8fd7277bef32cf0a3 100644 (file)
@@ -2,6 +2,7 @@
 #include <reg-82801b.h>
 #include <string.h>
 #include <stdint.h>
+#include <stdlib.h>
 
 static uint16_t _get_PMBASE()
 {
@@ -14,7 +15,7 @@ static uint16_t _get_PMBASE()
 }
 
 
-extern unsigned int poke(short addr);
+extern unsigned int poke(unsigned long addr);
 
 int main(int argc, char **argv)
 {
@@ -25,7 +26,7 @@ int main(int argc, char **argv)
                perror("iopl");
                return 1;
        }
-
+       
        res = poke(_get_PMBASE() + 0x04);
        printf("found %p\n", res);
 }
This page took 0.031767 seconds and 4 git commands to generate.