[prev in list] [next in list] [prev in thread] [next in thread]
List: openbsd-bugs
Subject: Re: i386/2661
From: Kamo Hiroyasu <wd () ics ! nara-wu ! ac ! jp>
Date: 2002-05-18 18:26:01
[Download RAW message or body]
I wrote:
> This patch makes Cyrix GXm and NS Geode GX1 happy. But I am afraid an
> additional patch may be necessary for MediaGX. I will write one after
> I wake up next morning.
Here is a patch against sys/arch/i386/i386/machdep.c v 1.206.
I have found another bug in i386_cpuid_cpus[], a 0 is missing. The
following patch includes a fix to the bug.
I have not tested this patch yet. But I will be able to test it with
Geode GX1 in a few days. I am afraid I cannot with MediaGX nor GXm.
Kamo Hiroyasu [Kamo is the family name and Hiroyasu the given name.]
--- sys/arch/i386/i386/machdep.c.orig Sat May 18 23:55:59 2002
+++ sys/arch/i386/i386/machdep.c Sun May 19 02:49:10 2002
@@ -317,10 +317,11 @@
#endif
#endif
void winchip_cpu_setup(const char *, int, int);
void cyrix3_cpu_setup(const char *, int, int);
+void cyrix5x86_cpu_setup(const char *, int, int);
void cyrix6x86_cpu_setup(const char *, int, int);
void intel586_cpu_setup(const char *, int, int);
void intel686_cpu_setup(const char *, int, int);
char * intel686_cpu_name(int);
char * cyrix3_cpu_name(int, int);
@@ -802,15 +803,15 @@
"Cyrix",
/* Family 4 */
{ {
CPUCLASS_486,
{
- 0, 0, 0, "MediaGX", 0, 0, 0, 0, "5x86", 0, 0,
- 0, 0, 0, 0,
+ 0, 0, 0, 0, "MediaGX", 0, 0, 0, 0, "5x86",
+ 0, 0, 0, 0, 0, 0,
"486 class" /* Default */
},
- NULL
+ cyrix5x86_cpu_setup
},
/* Family 5 */
{
CPUCLASS_586,
{
@@ -1034,15 +1035,31 @@
}
#endif
}
void
+cyrix5x86_cpu_setup(cpu_device, model, step)
+ const char *cpu_device;
+ int model, step;
+{
+#if defined(I486_CPU)
+ extern int clock_broken_latch;
+
+ switch (model) {
+ case 4: /* MediaGX */
+ clock_broken_latch = 1;
+ break;
+ }
+#endif
+}
+
+void
cyrix6x86_cpu_setup(cpu_device, model, step)
const char *cpu_device;
int model, step;
{
-#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)
+#if defined(I586_CPU) || defined(I686_CPU)
extern int clock_broken_latch;
switch (model) {
case -1: /* M1 w/o cpuid */
case 2: /* M1 */
@@ -1059,12 +1076,11 @@
/* disable access to ccr4/ccr5 */
cyrix_write_reg(0xC3, cyrix_read_reg(0xC3) & ~0x10);
printf("%s: xchg bug workaround performed\n", cpu_device);
break; /* fallthrough? */
- case 0x440:
- case 0x540:
+ case 4: /* GXm or GX1 */
clock_broken_latch = 1;
break;
}
#endif
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic