XLibre Xserver
Go to file
Julian Pidancet 59b618227e x86emu: Correctly handle 0x66 prefix for some instructions
(Sorry for double posting)

I repost this patch because I havn't got any replies from maintainers
since I posted the initial patch back in March.

Some instructions are not emulated correctly by x86emu when they
are prefixed by the 0x66 opcode.
I've identified problems in the emulation of these intructions: ret,
enter, leave, iret and some forms of call.

Most of the time, the problem is that these instructions should push or
pop 32-bit values to/from the stack, instead of 16bit, when they are
prefixed by the 0x66 special opcode.

The SeaBIOS project aims to produce a complete legacy BIOS
implementation as well as a VGA option ROM, entirely written in C and
using the GCC compiler.

In 16bit code produced by the GCC compiler, the 0x66 prefix is used
almost everywhere. This patch is necessary to allow the SeaBIOS VGA
option ROM to function with Xorg when using the vesa driver.

SeaBIOS currently use postprocessing on the ROM assembly output to
replace the affected instruction with alternative unaffected instructions.
This is obviously not very elegant, and this fix in x86emu would be
more appropriate.

v2: - Decrement BP instead of EBP in accordance with the Intel Manual
    - Assign EIP instead of IP when poping the return address from the
    stack in 32-bit operand size mode in ret_far_IMM, ret_far, and iret
    - When poping EFLAGS from the stack in iret in 32-bit operand size
    mode, apply some mask to preserve Read-only flags.

v3: - Rebase

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
2015-12-07 14:49:36 -05:00
Xext Xext/xselinux: Use NotifyFd interface 2015-12-01 13:55:56 -05:00
Xi Input: Add focus-in event source 2015-11-24 11:36:34 +10:00
composite composite: Factor out backing store transition 2015-09-24 13:01:51 -04:00
config config: Use NotifyFd interface for udev 2015-12-01 13:55:15 -05:00
damageext Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
dbe Convert top level extensions to new *allocarray functions 2015-04-21 16:57:08 -07:00
dix dix: Move InitFonts up above screen initialization 2015-12-01 13:55:11 -05:00
doc doc: Convert an \fP pair into appropriate tags. 2015-09-23 10:32:53 -04:00
dri3 dri3: static cleanup 2015-07-08 16:40:57 -04:00
exa build: Remove stale miext/cw include paths 2015-10-27 13:46:13 -04:00
fb Fix alphamap interactions with wfb 2015-09-29 12:21:34 -04:00
glamor glamor: Delay making pixmaps shareable until we need to. 2015-11-18 10:04:44 -08:00
glx glx: Fix header length error checking in __glXDisp_RenderLarge 2015-10-19 11:51:58 -04:00
hw x86emu: Correctly handle 0x66 prefix for some instructions 2015-12-07 14:49:36 -05:00
include os: Use NotifyFd interface for listen descriptors 2015-12-01 13:56:15 -05:00
m4 configure.ac: remove remaining TLS references 2015-03-24 17:20:26 +00:00
man Xserver.man: document more transports for -nolisten & -listen options 2015-10-28 14:16:28 -04:00
mi mi: Correct a miscall of abs() to instead call fabs() 2015-10-19 11:49:52 -04:00
miext rootless: Fix bogus handling of broken root clip 2015-09-21 17:44:48 -04:00
os os: Use NotifyFd interface for listen descriptors 2015-12-01 13:56:15 -05:00
present present: Do not replace Pixmaps on redirected Window on unflip 2015-12-07 14:37:13 -05:00
pseudoramiX Convert top level extensions to new *allocarray functions 2015-04-21 16:57:08 -07:00
randr randr: Stop dirty tracking for shared pixmap being destroyed 2015-12-02 10:56:56 -05:00
record Convert top level extensions to new *allocarray functions 2015-04-21 16:57:08 -07:00
render render: Use OsTimer for animated cursor timing 2015-12-01 13:56:12 -05:00
test build: Remove stale miext/cw include paths 2015-10-27 13:46:13 -04:00
xfixes xfixes: Unexport xfixes.h 2015-07-08 16:40:58 -04:00
xkb Replace 'sun' with '__sun' 2015-11-30 11:51:22 -05:00
.dir-locals.el Add .dir-locals.el 2013-08-17 12:17:36 +02:00
.gitignore .gitignore: Add new autotools file 'test-driver' 2014-04-21 13:41:42 -07:00
COPYING modesetting: Merge modesetting's COPYING into the xserver's. 2014-09-15 12:46:02 -07:00
Makefile.am DIST_SUBDIRS needs to include glamor, even if it isn't built 2014-02-13 15:25:56 -08:00
README
autogen.sh autogen.sh: use quoted string variables 2015-03-13 12:31:21 +10:00
configure.ac Remove non-smart scheduler. Don't require setitimer. 2015-12-01 13:54:54 -05:00
devbook.am doc: Create a script to filter xmlto output 2015-01-05 14:24:06 -08:00
docbook.am docbook.am: embed css styles inside the HTML HEAD element 2011-09-21 14:07:49 -07:00
fix-miregion Change region implementation names to eliminate the 'mi' prefix 2010-06-05 17:47:32 -07:00
fix-miregion-private Change region implementation names to eliminate the 'mi' prefix 2010-06-05 17:47:32 -07:00
fix-patch-whitespace Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
fix-region Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
manpages.am Xorg: Add a suid root wrapper 2014-03-12 08:50:05 +01:00
xorg-server.m4 macros: clarify documentation 2012-11-05 13:24:57 -06:00
xorg-server.pc.in xfree86: link modules against Xorg symbols on Cygwin 2012-04-05 21:57:07 -05:00
xserver.ent.in doc: relocate xserver.ent in the package root directory 2011-05-14 11:22:26 -07:00

					X Server

The X server accepts requests from client applications to create windows,
which are (normally rectangular) "virtual screens" that the client program
can draw into.

Windows are then composed on the actual screen by the X server
(or by a separate composite manager) as directed by the window manager,
which usually communicates with the user via graphical controls such as buttons
and draggable titlebars and borders.

For a comprehensive overview of X Server and X Window System, consult the
following article:
http://en.wikipedia.org/wiki/X_server

All questions regarding this software should be directed at the
Xorg mailing list:

        http://lists.freedesktop.org/mailman/listinfo/xorg

Please submit bug reports to the Xorg bugzilla:

        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg

The master development code repository can be found at:

        git://anongit.freedesktop.org/git/xorg/xserver

        http://cgit.freedesktop.org/xorg/xserver

For patch submission instructions, see:

	http://www.x.org/wiki/Development/Documentation/SubmittingPatches

For more information on the git code manager, see:

        http://wiki.x.org/wiki/GitPage