Bug 11717 - cpuid instruction not supported on some CPUs
Summary: cpuid instruction not supported on some CPUs
Status: RESOLVED FIXED
Alias: None
Product: pixman
Classification: Unclassified
Component: pixman (show other bugs)
Version: 0.1.3
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Søren Sandmann Pedersen
QA Contact: Søren Sandmann Pedersen
URL: http://bugs.debian.org/353494
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-24 16:22 UTC by Julien Cristau
Modified: 2008-01-21 14:07 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Julien Cristau 2007-07-24 16:22:24 UTC
The detectCPUFeatures() function in pixman (formerly in the X server) uses the cpuid instruction unconditionally.  Apparently some cyrix processors don't support that instruction, and X aborts with SIGILL (see the referenced URL).  It seems to be possible to detect this by checking whether the ID bit in the EFLAGS register is writable.
Comment 1 Søren Sandmann Pedersen 2007-10-17 16:29:49 UTC
This really needs a (tested) patch from someone with the chip in question.
Comment 2 Brice Goglin 2007-12-25 00:19:20 UTC
According to Michael Karcher, this bug is uncorrelated to Cyrix CPUs. It is caused by an bad expression in the MMX detection code. Apparently, gas changed the handling of local labels, so "jnz 1" does not assemble to the same as
"jnz 1f", which it once did, IIRC. The documentation for gas does not
mention local labels without an "f" or "b" suffix.

The jump is only taken if CPUID is not present. The 6x68 CPUs are the last ones where CPUID is not present (not enabled by some Cyrix-special CPU configuration bit, in fact). Any Pentium has CPUID, the later Intel 486 (DX2 and upwards) has CPUID, any AMD processor since the 5x68 has cpuid, so the later processors k5 and k6 do have cpuid.

He sent the following patch to fix this for Xserver 1.1.
http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=67;filename=xorg-patch.diff;att=1;bug=353494

Apparently, these two "f" suffix were still missing in Xserver 1.3 but they are now present in pixman/Xserver 1.4. So this bug might actually be fixed. Maybe somebody will be able to test this on real hardware...
Comment 3 Benjamin Close 2008-01-11 02:38:58 UTC
Bugzilla Upgrade Mass Bug Change

NEEDSINFO state was removed in Bugzilla 3.x, reopening any bugs previously listed as NEEDSINFO.

  - benjsc
    fd.o Wrangler
Comment 4 Søren Sandmann Pedersen 2008-01-21 14:07:30 UTC
Let's close it then. People who get sigill from the cpuid can reopen.


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.