diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2017-06-08 22:54:19 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-06-14 17:25:25 +1000 |
commit | 385a6903d5f7a938f01e579071a43dc7decd199d (patch) | |
tree | 9ab7cccd8e01b06c2e1eccec29bc2a95c3b2b80a /external | |
parent | 8f997dcf36679e7d3d2b194352868212d9be32d3 (diff) | |
download | skiboot-385a6903d5f7a938f01e579071a43dc7decd199d.zip skiboot-385a6903d5f7a938f01e579071a43dc7decd199d.tar.gz skiboot-385a6903d5f7a938f01e579071a43dc7decd199d.tar.bz2 |
mambo: Create multiple chips when we have multiple CPUs
Currently when we boot mambo with multiple CPUs, we create multiple CPU nodes in
the device tree, and each claims to be on a separate chip.
However we don't create multiple xscom nodes, which means skiboot only knows
about a single chip, and all CPUs end up on it. At the moment mambo is not able
to create multiple xscom controllers. We can create fake ones, just by faking
the device tree up, but that seems uglier than this solution.
So create a mambo-chip for each CPU other than 0, to tell skiboot we want a
separate chip created. This then enables Linux to see multiple chips:
smp: Brought up 2 nodes, 2 CPUs
numa: Node 0 CPUs: 0
numa: Node 1 CPUs: 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.tcl | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl index 9ac765d..cc5f25e 100644 --- a/external/mambo/skiboot.tcl +++ b/external/mambo/skiboot.tcl @@ -244,11 +244,21 @@ if { $default_config == "P9" } { set pir 0 for { set c 0 } { $c < $mconf(cpus) } { incr c } { set cpu_node [mysim of find_device "/cpus/PowerPC@$pir"] - mysim of addprop $cpu_node int "ibm,chip-id" $c mysim of addprop $cpu_node int "ibm,pir" $pir set reg [list 0x0000001c00000028 0xffffffffffffffff] mysim of addprop $cpu_node array64 "ibm,processor-segment-sizes" reg + mysim of addprop $cpu_node int "ibm,chip-id" $c + + # Create a chip node to tell skiboot to create another chip for this CPU. + # This bubbles up to Linux which will then see a new chip (aka nid). + # For chip 0 the xscom node above has already definied chip 0, so skip it. + if { $c > 0 } { + 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" + } + set reg {} lappend reg 0x0000000c 0x00000010 0x00000018 0x00000022 mysim of addprop $cpu_node array "ibm,processor-page-sizes" reg |