diff options
author | Madhavan Srinivasan <maddy@linux.vnet.ibm.com> | 2017-09-11 14:05:39 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-09-12 22:52:08 -0500 |
commit | 956083b4e0ec83480d33985dde6df51f7e657b5c (patch) | |
tree | c5b75fc4d46d4dd24bb82a5a2ad1fcef18782dad /external/mambo | |
parent | 8782c0da7243fb6c608e6a00fd90957423832481 (diff) | |
download | skiboot-956083b4e0ec83480d33985dde6df51f7e657b5c.zip skiboot-956083b4e0ec83480d33985dde6df51f7e657b5c.tar.gz skiboot-956083b4e0ec83480d33985dde6df51f7e657b5c.tar.bz2 |
skiboot/skiboot.tcl: Add imc device nodes to skiboot.tcl
Add In-Memory Collection counter dummy nodes to the skiboot.tcl
to aid code testing in mambo for both OPAL and Kernel side enablement.
Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external/mambo')
-rw-r--r-- | external/mambo/skiboot.tcl | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl index 46d8569..ad10355 100644 --- a/external/mambo/skiboot.tcl +++ b/external/mambo/skiboot.tcl @@ -325,6 +325,88 @@ for { set c 0 } { $c < $mconf(cpus) } { incr c } { mysim of addprop $cpu_node array "ibm,ppc-interrupt-server#s" irqreg } +#Add In-Memory Collection Counter nodes +if { $default_config == "P9" } { + #Add the base node "imc-counters" + set imc_c [mysim of addchild $root_node "imc-counters" ""] + mysim of addprop $imc_c string "compatible" "ibm,opal-in-memory-counters" + mysim of addprop $imc_c int "#address-cells" 1 + mysim of addprop $imc_c int "#size-cells" 1 + mysim of addprop $imc_c int "version-id" 1 + + #Add a common mcs event node + set mcs_et [mysim of addchild $imc_c "nest-mcs-events" ""] + mysim of addprop $mcs_et int "#address-cells" 1 + mysim of addprop $mcs_et int "#size-cells" 1 + + #Add a event + set et [mysim of addchild $mcs_et event [format %x 0]] + mysim of addprop $et string "event-name" "64B_RD_OR_WR_DISP_PORT01" + mysim of addprop $et string "unit" "MiB/s" + mysim of addprop $et string "scale" "4" + mysim of addprop $et int "reg" 0 + + #Add a event + set et [mysim of addchild $mcs_et event [format %x 1]] + mysim of addprop $et string "event-name" "64B_WR_DISP_PORT01" + mysim of addprop $et string "unit" "MiB/s" + mysim of addprop $et int "reg" 40 + + #Add a event + set et [mysim of addchild $mcs_et event [format %x 2]] + mysim of addprop $et string "event-name" "64B_RD_DISP_PORT01" + mysim of addprop $et string "scale" "100" + mysim of addprop $et int "reg" 64 + + #Add a event + set et [mysim of addchild $mcs_et event [format %x 3]] + mysim of addprop $et string "event-name" "64B_XX_DISP_PORT01" + mysim of addprop $et int "reg" 32 + + #Add a mcs device node + set mcs_01 [mysim of addchild $imc_c "mcs01" ""] + mysim of addprop $mcs_01 string "compatible" "ibm,imc-counters" + mysim of addprop $mcs_01 string "events-prefix" "PM_MCS01_" + mysim of addprop $mcs_01 int "reg" 65536 + mysim of addprop $mcs_01 int "size" 262144 + mysim of addprop $mcs_01 int "offset" 1572864 + mysim of addprop $mcs_01 int "events" $mcs_et + mysim of addprop $mcs_01 int "type" 16 + mysim of addprop $mcs_01 string "unit" "KiB/s" + mysim of addprop $mcs_01 string "scale" "8" + + #Add a common core event node + set ct_et [mysim of addchild $imc_c "core-thread-events" ""] + mysim of addprop $ct_et int "#address-cells" 1 + mysim of addprop $ct_et int "#size-cells" 1 + + #Add a event + set cet [mysim of addchild $ct_et event [format %x 200]] + mysim of addprop $cet string "event-name" "0THRD_NON_IDLE_PCYC" + mysim of addprop $cet string "desc" "The number of processor cycles when all threads are idle" + mysim of addprop $cet int "reg" 200 + + #Add a core device node + set core [mysim of addchild $imc_c "core" ""] + mysim of addprop $core string "compatible" "ibm,imc-counters" + mysim of addprop $core string "events-prefix" "CPM_" + mysim of addprop $core int "reg" 24 + mysim of addprop $core int "size" 8192 + mysim of addprop $core string "scale" "512" + mysim of addprop $core int "events" $ct_et + mysim of addprop $core int "type" 4 + + #Add a thread device node + set thread [mysim of addchild $imc_c "thread" ""] + mysim of addprop $thread string "compatible" "ibm,imc-counters" + mysim of addprop $thread string "events-prefix" "CPM_" + mysim of addprop $thread int "reg" 24 + mysim of addprop $thread int "size" 8192 + mysim of addprop $thread string "scale" "512" + mysim of addprop $thread int "events" $ct_et + mysim of addprop $thread int "type" 1 +} + mconfig enable_stb SKIBOOT_ENABLE_MAMBO_STB 0 if { [info exists env(SKIBOOT_ENABLE_MAMBO_STB)] } { |