NetBSD Problem Report #8505
Received: (qmail 12865 invoked from network); 28 Sep 1999 11:35:35 -0000
Message-Id: <19990928113920.24617.qmail@mailhost.dave.dtsp.co.nz>
Date: 28 Sep 1999 11:39:20 -0000
From: dave@dtsp.co.nz
Reply-To: dave@dtsp.co.nz
To: gnats-bugs@gnats.netbsd.org
Cc: dave@dtsp.co.nz
Subject: Some cyrix CPUs can be locked solid from userland
X-Send-Pr-Version: 3.95
>Number: 8505
>Category: port-i386
>Synopsis: Some cyrix CPUs can be locked solid from userland
>Confidential: no
>Severity: critical
>Priority: low
>Responsible: mycroft
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Sep 28 04:50:01 +0000 1999
>Closed-Date: Sat Jul 03 20:48:37 +0000 2004
>Last-Modified: Sat Jul 03 20:48:37 +0000 2004
>Originator: Dave Sainty
>Release: current, 19990926
>Organization:
Dynamic Technology Services and Products Ltd (NZ)
>Environment:
>Description:
It is possible to bring the system to a complete standstill with
userland code on a system based on older cyrix chips.
This is actually a very old known bug I happened to chance apon whilst
sifting through very old bugtraq posts.
Newer Cyrix chips are not affected. I have a 300 and a 166 here, the
166 is affected, but the 300 is unscathed.
>How-To-Repeat:
static unsigned char c[4];
main()
{
asm ("movl $_c, %ebx\n\t"
"again: xchgl (%ebx), %eax\n\t"
"movl %eax, %edx\n\t"
"jmp again\n\t");
}
compile, execute and either ctrl-C or reboot, whichever is appropriate
:)
>Fix:
According to one post, under Linux, "set6x86 -p 0xc1 -s 0x10" fixes
the problem. Gosh! :)
If this is the case, it would seem sensible to include this
initialisation (whatever it does - but it is obviously simple) as part
of the chip specific system initialisation for affected chips.
Sorry, no implementation... yet...
>Release-Note:
>Audit-Trail:
From: "Dr. Lex Wennmacher" <wennmach@geo.Uni-Koeln.DE>
To: dave@dtsp.co.nz
Cc: wennmach@pluto.geo.Uni-Koeln.DE, gnats-bugs@gnats.netbsd.org
Subject: Re: port-i386/8505: Some cyrix CPUs can be locked solid from userland
Date: Tue, 28 Sep 1999 17:17:29 +0200
I just run the code in question on my
NetBSD 1.4 (HAL) #2: Sat Jun 5 23:50:38 MEST 1999
wennmach@hal:/usr/src/sys/arch/i386/compile/HAL
cpu0: Cyrix 6x86 (486-class)
No lockup, the program can be interrupted with ^C.
Btw. it seems to me that there's a slight confusion concerning Cyrix CPUs in
the 1.4 kernel: My "Cyrix 5x86-100QP" (I just opened my notebook to check the
exact imprint on the CPU) gets detected as "Cyrix 6x86 (486-class)". The
486-class is right, but the 6x86 seems wrong, should read 5x86 instead.
--
Dr. Alexandre Wennmacher
Institut fuer Geophysik und Meteorologie wennmach@geo.Uni-Koeln.DE
Universitaet zu Koeln phone +49 221 470 - 3387
D-50923 Koeln fax +49 221 470 - 5198
From: Matthew Orgass <darkstar@pgh.net>
To: Dave Sainty <dave@dtsp.co.nz>
Cc: wennmach@geo.Uni-Koeln.DE, netbsd-bugs@netbsd.org, port-i386@netbsd.org,
gnats-bugs@gnats.netbsd.org
Subject: Re: port-i386/8505: Some cyrix CPUs can be locked solid from userland
Date: Tue, 28 Sep 1999 22:20:12 -0400 (EDT)
On Wed, 29 Sep 1999, Dave Sainty wrote:
> I believe the lockup is restricted to pentium class CPUs.
Yes and no. This is the "coma bug" which affects several types of Cyrix
CPUs. However, the fix is enabled for most affected Cyrix CPUs, just not
for 6x86MX machines. See PR i386/7538 for the patch to enable the fix.
Note that there is also another bug in some Cyrix 6x86 CPUs that freezes
with the following code:
int main()
{
asm ("foo:");
asm ("cwtl");
asm ("orl $0xe6ebe020,%eax");
asm ("jle foo");
asm ("addb %al,(%eax)");
return 0;
}
No known fix is available.
Matthew Orgass
darkstar@pgh.net
State-Changed-From-To: open->closed
State-Changed-By: mycroft
State-Changed-When: Sat Jul 3 20:39:49 UTC 2004
State-Changed-Why:
This was fixed a long time ago, by adding the Cyrix workaround which
serializes the xchg instruction.
Responsible-Changed-From-To: port-i386-maintainer->mycroft
Responsible-Changed-By: mycroft
Responsible-Changed-When: Sat Jul 3 20:39:49 UTC 2004
Responsible-Changed-Why:
.
>Unformatted:
System: NetBSD tequila.dave.dtsp.co.nz 1.4K NetBSD 1.4K (TEQUILA) #7: Fri Sep 17 23:43:58 NZST 1999 dave@tequila.dave.dtsp.co.nz:/vol/tequila/userB/u2/NetBSD-current/src/sys/arch/i386/compile/TEQUILA i386
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.