X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/d88bb1f4479b42f9078674c33e6618c27c2c98ce..d5d3737996d3828397e02f0f953fbc5c9e63f709:/tools/poke-rls-asm.S?ds=sidebyside diff --git a/tools/poke-rls-asm.S b/tools/poke-rls-asm.S index ee44854..a67503e 100644 --- a/tools/poke-rls-asm.S +++ b/tools/poke-rls-asm.S @@ -1,20 +1,21 @@ +# poke-rls-asm.S +# Helper functions for poke-rls.c +# NetWatch system management mode administration console +# +# Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved. +# This program is free software; you can redistribute and/or modify it under +# the terms found in the file LICENSE in the root of this source tree. + .global poke poke: - # Preload registers: $0x1BADD00D - mov $0x1BADD00D, %ecx + mov 8(%esp), %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