[OpenBIOS] [PATCH v2] ppc64: Don't set Kp bit on SLB

Andreas Färber andreas.faerber at web.de
Sun May 22 21:23:12 CEST 2011


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.

Cc: Alexander Graf <agraf at suse.de>
Signed-off-by: Andreas Färber <andreas.faerber at web.de>
---
 arch/ppc/qemu/ofmem.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

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);
     }
-- 
1.7.3.4




More information about the OpenBIOS mailing list