aboutsummaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2017-10-12 21:42:31 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-11-30 23:47:59 -0600
commit360c92e6271c83ece9597c21370e9ee0704acd93 (patch)
treee9c7197a2f4ff74cf3d89e03785b00d870d4ca1c /external
parent938d1d9ed964686fc6f5f4fb7ae1bfd281593ed8 (diff)
downloadskiboot-360c92e6271c83ece9597c21370e9ee0704acd93.zip
skiboot-360c92e6271c83ece9597c21370e9ee0704acd93.tar.gz
skiboot-360c92e6271c83ece9597c21370e9ee0704acd93.tar.bz2
mambo: Add support for NUMA
Currently the mambo scripts can do multiple chips, but only the first ever has memory. This patch adds support for having memory on each chip, with each appearing as a separate NUMA node. Each node gets MEM_SIZE worth of memory. It's opt-in, via export MAMBO_NUMA=1. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external')
-rw-r--r--external/mambo/skiboot.tcl25
1 files changed, 25 insertions, 0 deletions
diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl
index ad10355..abceb74 100644
--- a/external/mambo/skiboot.tcl
+++ b/external/mambo/skiboot.tcl
@@ -13,6 +13,10 @@ mconfig cpus CPUS 1
mconfig threads THREADS 1
mconfig memory MEM_SIZE 4G
+# Create multiple memory nodes? This will create a MEM_SIZE region
+# on each chip (CPUS above).
+mconfig numa MAMBO_NUMA 0
+
# Should we stop on an illeagal instruction
mconfig stop_on_ill MAMBO_STOP_ON_ILL false
@@ -80,12 +84,26 @@ myconf config machine_option/NO_ROM TRUE
if { $default_config == "PEGASUS" } {
# We need to be DD2 or greater on p8 for the HILE HID bit.
myconf config processor/initial/PVR 0x4b0201
+
+ if { $mconf(numa) } {
+ myconf config memory_region_id_shift 35
+ }
}
+
if { $default_config == "P9" } {
# PVR configured for POWER9 DD2.0 Scale out 24 Core (ie SMT4)
myconf config processor/initial/PVR 0x4e1200
myconf config processor/initial/SIM_CTRL1 0xc228000400000000
+
+ if { $mconf(numa) } {
+ myconf config memory_region_id_shift 45
+ }
+}
+
+if { $mconf(numa) } {
+ myconf config memory_regions $mconf(cpus)
}
+
if { [info exists env(SKIBOOT_SIMCONF)] } {
source $env(SKIBOOT_SIMCONF)
}
@@ -257,6 +275,13 @@ for { set c 0 } { $c < $mconf(cpus) } { incr c } {
set node [mysim of addchild $root_node "mambo-chip" [format %x $c]]
mysim of addprop $node int "ibm,chip-id" $c
mysim of addprop $node string "compatible" "ibm,mambo-chip"
+
+ if { $mconf(numa) } {
+ set shift [myconf query memory_region_id_shift]
+ set addr [format %lx [expr (1 << $shift) * $c]]
+ set node [mysim of find_device "/memory@$addr"]
+ mysim of addprop $node int "ibm,chip-id" $c
+ }
}
set reg {}