From 28d953d4275920ea2191ecf0c57ed966976a76b2 Mon Sep 17 00:00:00 2001 From: afaerber Date: Sun, 22 May 2011 22:29:33 +0000 Subject: [PATCH] ppc64: Don't set Kp bit on SLB MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Since QEMU 81762d6dd0d430d87024f2c83e9c4dcc4329fb7d (Clean up PowerPC SLB handling code) we never got to the ppc64 OpenBIOS banner. According to Alex' debugging this is due to the Kp bit being set. The code was supposed to be a 1:1 translation of the old mtsrin code, which did not set Kp bit. So don't set Kp bit with slbmte. Introduce a define for the shift, suggested by Alex. Signed-off-by: Andreas Färber Acked-by: Alexander Graf git-svn-id: svn://openbios.org/openbios/trunk/openbios-devel@1041 f158a5a8-5612-0410-a976-696ce0be7e32 --- arch/ppc/qemu/ofmem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/ppc/qemu/ofmem.c b/arch/ppc/qemu/ofmem.c index 297e685..1319389 100644 --- a/arch/ppc/qemu/ofmem.c +++ b/arch/ppc/qemu/ofmem.c @@ -25,6 +25,8 @@ #define BIT(n) (1U << (31 - (n))) +#define SLB_VSID_SHIFT 12 + /* called from assembly */ extern void dsi_exception(void); extern void isi_exception(void); @@ -497,7 +499,7 @@ setup_mmu(unsigned long ramsize) slbia(); /* Invalidate all SLBs except SLB 0 */ for (i = 0; i < 16; i++) { - unsigned long rs = ((0x400 + i) << 12) | (0x10 << 7); + unsigned long rs = (0x400 + i) << SLB_VSID_SHIFT; unsigned long rb = ((unsigned long)i << 28) | (1 << 27) | i; slbmte(rs, rb); } -- 2.11.4.GIT