diff mbox series

[4/4] external/mambo: skiboot.tcl add Power11 config

Message ID 20240404055618.1439108-4-mahesh@linux.ibm.com
State New
Headers show
Series [1/4] Initial Power11 enablement | expand

Commit Message

Mahesh J Salgaonkar April 4, 2024, 5:56 a.m. UTC
Setup skiboot.tcl with Power11 config to be boot on Power11 mambo.

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.ibm.com>
---
 external/mambo/skiboot.tcl | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
diff mbox series

Patch

diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl
index 6c0eb5a0d0..cce84d2058 100644
--- a/external/mambo/skiboot.tcl
+++ b/external/mambo/skiboot.tcl
@@ -175,6 +175,34 @@  if { $default_config == "P10" } {
     }
 }
 
+if { $default_config == "P11" } {
+    # PVR configured for POWER11 DD2.0, LPAR-per-thread
+    myconf config processor/initial/SIM_CTRL  0x0c1dd60000000000
+    if { $mconf(threads) == 8 } {
+        # Big-core mode.
+        myconf config processor/initial/PVR 0x00820200
+        myconf config processor/initial/SIM_CTRL1 0xc0400c0400040a40
+	puts "Set P11 big-core mode"
+    } else {
+        # Small-core mode.
+        myconf config processor/initial/PVR 0x00821200
+        myconf config processor/initial/SIM_CTRL1 0xc0400c0401040a40
+        if { $mconf(threads) != 1 && $mconf(threads) != 2 && $mconf(threads) != 4 } {
+            puts "ERROR: Bad threads configuration"
+            exit
+        }
+        if { $mconf(threads) != 4 && $mconf(cpus) != 1 } {
+            puts "ERROR: Bad threads, cpus configuration"
+            exit
+        }
+
+	puts "Set P11 small-core mode"
+    }
+
+    if { $mconf(numa) } {
+        myconf config memory_region_id_shift 44
+    }
+}
 
 if { $mconf(numa) } {
     myconf config memory_regions $mconf(cpus)