[OpenBIOS] [PATCH v2 09/10] ppc: Fix stack setup

Andreas Färber andreas.faerber at web.de
Mon Oct 11 14:47:44 CEST 2010


The exception stack was always set up 64 KiB below the ROM,
ignoring hash table alignment.
Align the stack pointer appropriately.

v2:
* Drop buggy distinction based on PVR value since the previous patch
  unifies alignment. Suggested by Segher Boessenkool.

Cc: Alexander Graf <agraf at suse.de>
Cc: Segher Boessenkool <segher at kernel.crashing.org>
Signed-off-by: Andreas Färber <andreas.faerber at web.de>
---
 arch/ppc/qemu/start.S |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/ppc/qemu/start.S b/arch/ppc/qemu/start.S
index d0d51b5..0775536 100644
--- a/arch/ppc/qemu/start.S
+++ b/arch/ppc/qemu/start.S
@@ -334,9 +334,13 @@ GLOBL(_entry):
 
 	addis	r1, r3, -16		/* ramsize - 1MB */
 
-	/* setup exception stack */
+	/* setup hash table */
 
 	addis	r1, r1, -1		/* - 64 kB */
+	clrrwi	r1, r1, 5*4		/* & ~0xfffff */
+
+	/* setup exception stack */
+
 	mtsprg0	r1
 
 	/* setup stack */
-- 
1.7.3




More information about the OpenBIOS mailing list