Commit Graph

16 Commits

Author SHA1 Message Date
Julien Cristau
102c4dac7c x86emu: fix sparse warnings
ops2.c:113:18: warning: Using plain integer as NULL pointer
ops2.c:207:18: warning: Using plain integer as NULL pointer
2008-10-26 13:17:31 +01:00
Adam Jackson
c8d066a151 Implement bswap in x86emu.
Yes, this is a 486+ instruction and thus not strictly legal in vm86
mode, but enough BIOSes use it (looking at you VIA) that we might as
well implement it.
2008-06-23 14:00:50 -04:00
Bart Trojanowski
66f8001b61 X86EMU: handle CPUID instruction
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>
2008-02-08 10:48:40 -08:00
Aaron Plattner
c4b7e9d1c1 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.
2007-02-06 15:45:05 -08:00
Aaron Plattner
66fa87292e Fix BSF and BSR instructions in the x86 emulator.
Patch courtesy of Michael Yaroslavtsev.
2007-01-03 13:47:01 -08:00
Felix Kuehling
21f7f2fb11 Enable correct handling of the BTS instruction (opcode 0f ab) The code was
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.)
2006-03-15 18:43:32 +00:00
Adam Jackson
2f07222106 Bug #2455: Make x86emu handle JNL correctly. (David Wong) 2005-02-18 17:52:48 +00:00
Egbert Eich
05a3dbf5dc Updated x86emu and resynced with upsteam at Scitech. 2004-05-26 17:44:29 +00:00
Egbert Eich
0664db19bf Merging XORG-CURRENT into trunk 2004-04-23 18:54:16 +00:00
Egbert Eich
dae90c3af9 Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 2004-03-14 08:34:49 +00:00
Egbert Eich
867451f1ab Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 2004-03-03 12:12:50 +00:00
Egbert Eich
df0313d35b readding XFree86's cvs IDs 2004-02-26 13:36:15 +00:00
Egbert Eich
147aae87fd Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 2004-02-26 09:23:53 +00:00
Kaleb Keithley
4ee0a53de8 Import most of XFree86 4.4RC3. This import excludes files which have the
new license. If we want to, later we can import 4.4RC3 again and pick
    up the files that have the new license, but for now the vendor branch
    is "pure."
2004-02-23 20:35:22 +00:00
Kaleb Keithley
adc7f9a4eb XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks 2003-11-25 19:29:01 +00:00
Kaleb Keithley
9508a382f8 Initial revision 2003-11-14 16:48:57 +00:00