lkml.org 
[lkml]   [2008]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
SubjectRe: kernel won't boot on a Cyrix MediaGXm (Geode )
Ingo Molnar wrote:
> any patch we should pick up to make your box boot?
>
I've looked through various datasheets and found that the GXm and GXLV
Geode processors don't have an incrementor. I attached two patches.
One only calls the incrementor setup for GX1 or better. The other one
removes the incrementor setup entirely. As the incrementor value
differs according to clock speed and we would hope that the BIOS
configures it correctly, it is probably the better one to choose. But I
will leave that choice up to you. Either one works for me. :-)
diff --git a/arch/x86/kernel/cpu/cyrix.c b/arch/x86/kernel/cpu/cyrix.c
index db5868c..d3323d1 100644
--- a/arch/x86/kernel/cpu/cyrix.c
+++ b/arch/x86/kernel/cpu/cyrix.c
@@ -155,7 +155,7 @@ static void __cpuinit set_cx86_inc(void)
* Configure later MediaGX and/or Geode processor.
*/

-static void __cpuinit geode_configure(void)
+static void __cpuinit geode_configure(unsigned char dir1)
{
unsigned long flags;
u8 ccr3;
@@ -174,7 +174,9 @@ static void __cpuinit geode_configure(void)

set_cx86_memwb();
set_cx86_reorder();
- set_cx86_inc();
+ /* GXm and GXLV don't have incrementors */
+ if (dir1 >= 0x80)
+ set_cx86_inc();

local_irq_restore(flags);
}
@@ -295,7 +297,7 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
* GX1 : 0x8x GX1 datasheet 56
*/
if ((0x30 <= dir1 && dir1 <= 0x6f) || (0x80 <= dir1 && dir1 <= 0x8f))
- geode_configure();
+ geode_configure(dir1);
get_model_name(c); /* get CPU marketing name */
return;
} else { /* MediaGX */diff --git a/arch/x86/kernel/cpu/cyrix.c b/arch/x86/kernel/cpu/cyrix.c
index db5868c..ada5050 100644
--- a/arch/x86/kernel/cpu/cyrix.c
+++ b/arch/x86/kernel/cpu/cyrix.c
@@ -134,23 +134,6 @@ static void __cpuinit set_cx86_memwb(void)
setCx86_old(CX86_CCR2, getCx86_old(CX86_CCR2) | 0x14);
}

-static void __cpuinit set_cx86_inc(void)
-{
- unsigned char ccr3;
-
- printk(KERN_INFO "Enable Incrementor on Cyrix/NSC processor.\n");
-
- ccr3 = getCx86(CX86_CCR3);
- setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */
- /* PCR1 -- Performance Control */
- /* Incrementor on, whatever that is */
- setCx86_old(CX86_PCR1, getCx86_old(CX86_PCR1) | 0x02);
- /* PCR0 -- Performance Control */
- /* Incrementor Margin 10 */
- setCx86_old(CX86_PCR0, getCx86_old(CX86_PCR0) | 0x04);
- setCx86(CX86_CCR3, ccr3); /* disable MAPEN */
-}
-
/*
* Configure later MediaGX and/or Geode processor.
*/
@@ -174,7 +157,6 @@ static void __cpuinit geode_configure(void)

set_cx86_memwb();
set_cx86_reorder();
- set_cx86_inc();

local_irq_restore(flags);
}
\
 
 \ /
  Last update: 2008-08-07 07:11    [W:0.126 / U:1.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site