x86emu: Add an RDTSC implementation to the x86 emulator
commit911f446d32283676dee7546be4015dac25fe463b
authorStefan Reinauer <reinauer@chromium.org>
Thu, 26 Jul 2012 22:15:38 +0000 (26 15:15 -0700)
committerPatrick Georgi <patrick@georgi-clan.de>
Fri, 27 Jul 2012 12:41:20 +0000 (27 14:41 +0200)
treec9091def1defd8456ac7180ea1e4d9f69f1357a6
parent08ef498d0bfd5d3cfaf70cdad1a8780d9dd2143e
x86emu: Add an RDTSC implementation to the x86 emulator

This instruction is being used in some debug VBIOSes.  This implementation
doesn't even try to be accurate.  Instead, it just increments the counter by a
fixed amount every time an rdtsc instruction in encountered, to avoid divides
by zero.

Imported from:
http://cgit.freedesktop.org/xorg/xserver/commit/?id=c4b7e9d1c16797c3e4b1200b40aceab5696a7fb8

Change-Id: I8fba1a060c57ccb7bbd44aa321dd349bc56bf574
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/1362
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
src/devices/oprom/x86emu/ops2.c