Subject: Re: AMD or Cyrix?
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: Michael L. VanLoon -- HeadCandy.com <michaelv@HeadCandy.com>
List: port-i386
Date: 05/13/1996 23:27:41
>On Mon, 13 May 1996 17:29:50 -0400 
> Jim Rees <rees@umich.edu> wrote:
> > Is NetBSD known to work on AMD and Cyrix 586 chips?  Anything I should watc
h
> > out for, like bios or chipset versions?

>NetBSD works pretty well on AMD chips ... Cyrix chips, however, are kind 
>of quirky...at least the 486 chips:

AMD 486 chips work great.  I've been using an AMD 486DX2/80 for about
a year and a half, with excellent results.  Haven't used an AMD 5x86,
but have heard from others that it works.  Haven't used a Cyrix 5x86,
but have heard it's faster, at the same clock speed, than the AMD.
I'm hearing good things about the Cyrix 6x86 all over the place,
leading me to believe they're doing a better job now than they did
with the 486DLC (which had cache coherency problems in many
motherboards).

I'm going to be trying a Cyrix 5x86 in my 486 machine, to breathe
another year or two of life into it.  If the Cyrix doesn't work, I'll
just use an AMD 5x86 in there, instead.  Because of the extra
performance, though, I'm going to try the Cyrix first.

>[ snippet from machdep.c ]
>        if (cpu == CPU_486DLC) {
>#ifndef CYRIX_CACHE_WORKS
>                printf("WARNING: CYRIX 486DLC CACHE UNCHANGED.\n");
>#else
>#ifndef CYRIX_CACHE_REALLY_WORKS
>                printf("WARNING: CYRIX 486DLC CACHE ENABLED IN HOLD-FLUSH MODE
.\
>n");
>#else   
>                printf("WARNING: CYRIX 486DLC CACHE ENABLED.\n");
>#endif  
>#endif 
>        }

This code was written _SPECIFICALLY_ for handling the 486DLC in 386
motherboards.  It was also sometimes useful for 486DLC motherboards
where they didn't bother to implement bus snooping.  The 486DLC was
not a true "486", but more of a 386/486 hybrid, and plugged into a 386
socket.  Many 386 motherboards (and CPUs) were too primitive to even
care about CPU cache coherency, requiring this DLC feature be turned
on, where the CPU would flush its cache any time a bus hold was
asserted by any bus device (indicating that a bus-master transaction
was potentially in progress).

This snippet of code should not apply in any way to true 486 (or
later) processors from any vender, including Cyrix.


One thing I found interesting about Cyrix was that they were more
interested in tuning their CPUs than AMD.  AMD made their 486 chip
execute instructions in *exactly* the same number of cycles as the
Intel chips, even when they had to slow some instructions down to do
so.  Personally, I have no sympathy for software that breaks because
of software timing loops, so I didn't find this particularly
beneficial.

Cyrix, on the other hand, would let the individual instructions run
faster.  They even went so far as to put hardware multipliers in their
486s, that would do a byte or word integer multiply in 7 clock cycles,
or dword multiply in 13 cycles, while the Intel chip would require
13-42 cycles.  Their 387 chip also was faster in many transcendental
functions (some up to twice as fast) compared to the Intel 486's FPU.
Unfortunately, that extra speed only partially made up for the
inefficient way 386/387 "exceptions" were handled, compared to the
improved method introduced on the 486, so the overall result was less
dramatic.

Many other little tweaks like this are what made the 486DLC faster
than a 386, in spite of the many similarities.  Carried to the next
level, it's what makes the Cyrix 6x86 some 20% faster than a Pentium,
at the same clock speed, in many of the tests I've read.

In spite of the black eye Cyrix (somewhat undeservedly) took over the
486DLC, I wouldn't hesitate to give another one of their CPUs a try.

On the other hand, my AMD 486 has been the model of stability, and I
have absolutely no complaints.  It may not be any faster than an Intel
486 at the same clock speed (ignoring that Intel never made an 80MHz
DX2), but it certainly works just as well.

One last thing to keep in mind is that you may indeed have weird
things happen with either brand of 5x86 chip if your BIOS doesn't know
how to handle it.  But, I intend to throw one at mine, and make them
live together anyway (even if I have to hack locore.s, again! [Hi
Charles!]). :-)

-----------------------------------------------------------------------------
  Michael L. VanLoon                                 michaelv@HeadCandy.com
        --<  Free your mind and your machine -- NetBSD free un*x  >--
    NetBSD working ports: 386+PC, Mac 68k, Amiga, Atari 68k, HP300, Sun3,
        Sun4/4c/4m, DEC MIPS, DEC Alpha, PC532, VAX, MVME68k, arm32...
    NetBSD ports in progress: PICA, others...

   Roll your own Internet access -- Seattle People's Internet cooperative.
                  If you're in the Seattle area, ask me how.
-----------------------------------------------------------------------------