[Skiboot] [PATCH] external/mambo: Update skiboot.tcl to add page-sizes nodes to device tree

Suraj Jitindar Singh sjitindarsingh at gmail.com
Wed Aug 31 16:01:25 AEST 2016


Currently skiboot.tcl doesn't add device tree nodes
ibm,processor-page-sizes or ibm,segment-page-sizes. This results in failure
when trying to boot a P8 guest using kvm in mambo.

Update skiboot.tcl in order to have it add these device tree nodes.

The values for these properties were taken from those hard-coded into
skiboot in hdata/cpu-common.c:78; the format was preserved for
readability and to make it obvious where these values came from.

With this change it is possible to boot a P8 kvm guest in mambo.

Signed-off-by: Suraj Jitindar Singh <sjitindarsingh at gmail.com>
---
 external/mambo/skiboot.tcl | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl
index 526f9b2..b8e68c9 100644
--- a/external/mambo/skiboot.tcl
+++ b/external/mambo/skiboot.tcl
@@ -191,6 +191,20 @@ for { set c 0 } { $c < $mconf(cpus) } { incr c } {
     mysim of addprop $cpu_node array64 "ibm,processor-segment-sizes" reg
 
     set reg {}
+    lappend reg 0x0000000c 0x00000010 0x00000018 0x00000022
+    mysim of addprop $cpu_node array "ibm,processor-page-sizes" reg
+
+    set reg {}
+    lappend reg 0x0c 0x000 3 0x0c 0x0000 ;#  4K seg  4k pages
+    lappend reg              0x10 0x0007 ;#  4K seg 64k pages
+    lappend reg              0x18 0x0038 ;#  4K seg 16M pages
+    lappend reg 0x10 0x110 2 0x10 0x0001 ;# 64K seg 64k pages
+    lappend reg              0x18 0x0008 ;# 64K seg 16M pages
+    lappend reg 0x18 0x100 1 0x18 0x0000 ;# 16M seg 16M pages
+    lappend reg 0x22 0x120 1 0x22 0x0003 ;# 16G seg 16G pages
+    mysim of addprop $cpu_node array "ibm,segment-page-sizes" reg
+
+    set reg {}
     if { $default_config == "P9" } {
 	# POWER9 PAPR defines upto bytes 62-63
 	# header + bytes 0-5
-- 
2.5.5



More information about the Skiboot mailing list