X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/f2b87dd63dc50a707ac102db7afb849b1f4f8db0..0889f342f13f65b875e67f78a27ad078f3f55736:/tools/poke-rls-asm.S?ds=sidebyside diff --git a/tools/poke-rls-asm.S b/tools/poke-rls-asm.S new file mode 100644 index 0000000..ee44854 --- /dev/null +++ b/tools/poke-rls-asm.S @@ -0,0 +1,20 @@ +.global poke +poke: + # Preload registers: $0x1BADD00D + mov $0x1BADD00D, %ecx + + # Parameter: I/O port to set bit 2 of + mov 4(%esp), %dx + 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