After trying to switch from X to VT (or just quit) the video-amd driver
attempts to issue INT 10/0 to go to mode 3 (VGA). The emulator, running
the BIOS code, would then spit out:
c000:0282: A2 ILLEGAL EXTENDED X86 OPCODE!
The opcode was 0F A2, or CPUID; it was not implemented in the emulator.
This simple patch, against 1.3.0.0, handles the CPUID instruction in one of
two ways:
1) if ran on __i386__ or __x86_64__ then it calls the CPUID instruction
directly.
2) if ran elsewhere it returns a canned 486dx4 set of values for
function 1.
This fix allows the video-amd driver to switch back to console mode,
with the GSW BIOS.
Thanks to Symbio Technologies for funding my work, and ThinCan for
providing hardware :)
Signed-off-by: Bart Trojanowski <bart@jukie.net>
Acked-by: Eric Anholt <eric@anholt.net>
Print debug messages only when the appropriate debug bit is set in the
8086 state vector, so you can focus in on the call you're actually
interested in.
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.
CFLAGS is a user variable, extracted from the environment at configure time
and settable by the user at build time. We must not override this variable.
there but #ifdefed out. Insead of BTS, BT was executed. This patch
enables the BTS function and hooks it up the the correct opcode. (ATI
Technologies Inc.)
Define NO_SYS_HEADERS, as the monolithic build does. Helps FreeBSD.
Don't include validate.c in the library, since it seems to be a userland
test program.