Bug 14332 - hw/xfree86/int10/helper_exec.c does ugly things to the BIOS
Summary: hw/xfree86/int10/helper_exec.c does ugly things to the BIOS
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/DDX/Xorg (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL: https://bugs.launchpad.net/ubuntu/+so...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-01 17:04 UTC by Martin-Éric Racine
Modified: 2011-02-17 21:08 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
x86emu blacklist patch (5.79 KB, patch)
2008-02-02 03:12 UTC, Martin-Éric Racine
no flags Details | Splinter Review
x86emu PCI bus polling patch (3.92 KB, patch)
2008-02-02 03:14 UTC, Martin-Éric Racine
no flags Details | Splinter Review
X86EMU: handle CPUID instruction (passthrough) (2.36 KB, patch)
2008-02-02 16:59 UTC, Bart Trojanowski
no flags Details | Splinter Review
14106: X86EMU: handle CPUID instruction (Gutsy, x-platform) (8.05 KB, patch)
2008-02-03 09:58 UTC, Bart Trojanowski
no flags Details | Splinter Review
X86EMU-added-blacklist-for-I-O-port-in-0-0xFF-range.patch (5.07 KB, patch)
2008-03-01 06:43 UTC, Bart Trojanowski
no flags Details | Splinter Review
X86EMU-when-emulating-PCI-access-use-the-correct-d.patch (4.51 KB, patch)
2008-03-01 06:45 UTC, Bart Trojanowski
no flags Details | Splinter Review

Description Martin-Éric Racine 2008-02-01 17:04:02 UTC
As discovered while investigating the above Ubuntu bug (see URL), x86emu does ugly things to the BIOS, when polling for DDC. This downright crashes the hardware, on platforms with picky BIOS.

Two patches have been made against X server 1.3 and X server 1.4, also found at the above bug report. They need to be merged into GIT before X server 1.5 is released.
Comment 2 Daniel Stone 2008-02-01 17:25:34 UTC
Not sure how XFree86 int10 support counts as 'core protocol' ...
Comment 3 Martin-Éric Racine 2008-02-02 03:12:57 UTC
Created attachment 14088 [details] [review]
x86emu blacklist patch

This is the first of two patches required to fix x86emu.
Comment 4 Martin-Éric Racine 2008-02-02 03:14:11 UTC
Created attachment 14089 [details] [review]
x86emu PCI bus polling patch

This second patch to x86emu fixes PCI bus polling.
Comment 5 Bart Trojanowski 2008-02-02 16:59:00 UTC
Created attachment 14106 [details] [review]
X86EMU: handle CPUID instruction (passthrough)

I have another related patch to add CPUID instruction emulation to x86emu.
Comment 6 Martin-Éric Racine 2008-02-03 05:15:28 UTC
The CPUID patch solves an issue that appeared with several video drivers starting with X server 1.3, where CTRL+ALT+F* would not successfully bring the user to the vcons anymore, even though this works fine when compiling the same video driver against an older X server.
Comment 7 Bart Trojanowski 2008-02-03 09:58:19 UTC
Created attachment 14122 [details] [review]
14106: X86EMU: handle CPUID instruction (Gutsy, x-platform)

This is an updated patch for CPUID instruction emulation, after absorbing sugestsions from xorg mailing list and IRC channel.
Comment 8 Eric Anholt 2008-02-19 12:04:01 UTC
14089 needs a fixed commit message at least
Comment 9 Adam Jackson 2008-02-29 14:23:31 UTC
The CPUID fix is already in master.

It's not clear from the description in attachment #14089 [details] [review], so: the bug there is that we should access the register on the device specified by the write to 0xcf8, which is not necessarily the video device.  It could easily be, say, the host bridge.

pciaccess makes this patch not apply directly, but basically we need to use the value written to 0xcf8 to construct a struct pci_device.  Whee.
Comment 10 Bart Trojanowski 2008-03-01 06:43:44 UTC
Created attachment 14731 [details] [review]
X86EMU-added-blacklist-for-I-O-port-in-0-0xFF-range.patch

This is a port of the "black list" patch to the master branch of xorg.
Comment 11 Bart Trojanowski 2008-03-01 06:45:02 UTC
Created attachment 14732 [details] [review]
X86EMU-when-emulating-PCI-access-use-the-correct-d.patch

This is a port of the patch, that fixes incorrect PCI device access bug, to the master branch.
Comment 12 Bart Trojanowski 2008-03-01 06:46:03 UTC
Please note that I have had issues building X from git so I was unable to test these patches.
Comment 13 Adam Jackson 2008-04-07 13:51:41 UTC
With the change to not treat the high bit of 0xcf8 as part of the domain number, this pretty much works now, as far as I can tell.

I'd like to see the blacklist done some other way, but the "right" way is probably a far more generic overhaul of ioport services than I really want to get into atm.  Taking this off the 7.4 blocker on the basis that it works again, but leaving open for further blacklist work.
Comment 14 Adam Jackson 2010-08-09 13:05:54 UTC
Good enough.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.