Patchwork [3/6] Geode GX2 cleanup patch

login
register
about
Submitter Nils
Date 2010-12-23 00:03:54
Message ID <201012230103.55072.njacobs8@hetnet.nl>
Download mbox | patch
Permalink /patch/2447/
State Superseded
Headers show

Comments

Nils - 2010-12-23 00:03:54
Add a "while (1)" function around the hlt instruction to assure the
processor can't wake up from an interrupt.

Signed-off-by: Nils Jacobs <njacobs8@hetnet.nl>

This was suggested by Uwe Hermann. Thanks!
I also included the same patch for Geode LX.

Nils.
Peter Stuge - 2010-12-26 05:19:18
Nils wrote:
> -		__asm__ __volatile__("hlt\n");
> +		while(1) {
> +			__asm__ __volatile__("hlt\n");
> +		}

Why not call die() instead? Is it too early for that?


//Peter
Stefan Reinauer - 2010-12-26 12:30:18
On 26.12.2010, at 06:19, Peter Stuge <peter@stuge.se> wrote:

> Nils wrote:
>> -        __asm__ __volatile__("hlt\n");
>> +        while(1) {
>> +            __asm__ __volatile__("hlt\n");
>> +        }
> 
> Why not call die() instead? Is it too early for that?
> 
> 

Die() is now extra. It should work early.

Patch

Index: src/northbridge/amd/gx2/pll_reset.c
===================================================================
--- src/northbridge/amd/gx2/pll_reset.c	(revision 6205)
+++ src/northbridge/amd/gx2/pll_reset.c	(working copy)
@@ -80,7 +80,9 @@ 
 	} else {
 		printk(BIOS_ERR, "Unsupported GX2_PROCESSOR_MHZ setting!\n");
 		post_code(POST_PLL_CPU_VER_FAIL);
-		__asm__ __volatile__("hlt\n");
+		while(1) {
+			__asm__ __volatile__("hlt\n");
+		}
 	}
 
 	/* clear the Bypass bit */
Index: src/northbridge/amd/lx/pll_reset.c
===================================================================
--- src/northbridge/amd/lx/pll_reset.c	(revision 6205)
+++ src/northbridge/amd/lx/pll_reset.c	(working copy)
@@ -61,7 +61,9 @@ 
 		/* You should never get here..... The chip has reset. */
 		printk(BIOS_ERR, "CONFIGURING PLL FAILURE\n");
 		post_code(POST_PLL_RESET_FAIL);
-		__asm__ __volatile__("hlt\n");
+		while(1) {
+			__asm__ __volatile__("hlt\n");
+		}
 
 	}
 	printk(BIOS_DEBUG, "PLL configured.\n");