From 0c3891e2c95c5a7e7a9bfeecb57d5ebb5bfc5707 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sat, 16 Oct 2010 17:36:15 +0000 Subject: [PATCH] ppc: Fix stack setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Cc: Segher Boessenkool Signed-off-by: Andreas Färber Signed-off-by: Blue Swirl git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@907 f158a5a8-5612-0410-a976-696ce0be7e32 --- arch/ppc/qemu/start.S | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 */