diff options
| author | Anju T Sudhakar <anju@linux.vnet.ibm.com> | 2019-03-22 12:13:49 +0530 |
|---|---|---|
| committer | Stewart Smith <stewart@linux.ibm.com> | 2019-03-28 15:24:13 +1100 |
| commit | 5506d8a45882f2dafaa314844c819f30206176b3 (patch) | |
| tree | 2ef1ce23dac37dc0acfdc3fcde91ee1291b4f61e /include | |
| parent | f3a0fb69904074341ece69a26f375bdd948a9073 (diff) | |
| download | talos-skiboot-5506d8a45882f2dafaa314844c819f30206176b3.tar.gz talos-skiboot-5506d8a45882f2dafaa314844c819f30206176b3.zip | |
include/imc: Trace IMC Macro definitions
Add macros needed for Trace mode enablement of IMC(In-Memory
Collection Counters). These macros are used to identify the
trace node in the device-tree and to make appropriate scom calls
to enable trace-mode in the hardware.
Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/imc.h | 30 | ||||
| -rw-r--r-- | include/opal-api.h | 1 |
2 files changed, 31 insertions, 0 deletions
diff --git a/include/imc.h b/include/imc.h index c2616296..6b04bb36 100644 --- a/include/imc.h +++ b/include/imc.h @@ -112,6 +112,7 @@ struct imc_chip_cb #define IMC_COUNTER_CHIP 0x10 #define IMC_COUNTER_CORE 0x4 #define IMC_COUNTER_THREAD 0x1 +#define IMC_COUNTER_TRACE 0x2 /* * Nest IMC operations @@ -128,6 +129,35 @@ struct imc_chip_cb #define CORE_IMC_HTM_MODE_ENABLE 0xE800000000000000ull #define CORE_IMC_HTM_MODE_DISABLE 0xE000000000000000ull +/* + * Trace IMC SCOMs for IMC trace-mode. + * + * TRACE_IMC_SCOM layout + * + * 0 4 8 12 16 20 24 28 + * | - - - - | - - - - | - - - - | - - - - | - - - - | - - - - | - - - - | - - - - | + * [ ] [ CPMC_LOAD [2:33] + * | + * *SAMPSEL + * + * 32 36 40 44 48 52 56 60 + * | - - - - | - - - - | - - - - | - - - - | - - - - | - - - - | - - - - | - - - - | + * ] [ ] [ ] [ ] [ RESERVED [51:63] ] + * | | | + * *CPMC1SEL *CPMC2SEL *BUFFERSIZE + */ +#define TRACE_IMC_ADDR 0x20010AA9ull +#define TRACE_IMC_SAMPLESEL(x) ((uint64_t)x << 62) +#define TRACE_IMC_CPMC_LOAD(x) ((0xffffffff - (uint64_t)x) << 30) +#define TRACE_IMC_CPMC1SEL(x) ((uint64_t)x << 23) +#define TRACE_IMC_CPMC2SEL(x) ((uint64_t)x << 16) +#define TRACE_IMC_BUFFERSIZE(x) ((uint64_t)x << 13) +#define TRACE_IMC_SCOM(a, b, c, d, e) (TRACE_IMC_SAMPLESEL(a) |\ + TRACE_IMC_CPMC_LOAD(b) |\ + TRACE_IMC_CPMC1SEL(c) |\ + TRACE_IMC_CPMC2SEL(d) |\ + TRACE_IMC_BUFFERSIZE(e)) + void imc_init(void); void imc_catalog_preload(void); void imc_decompress_catalog(void); diff --git a/include/opal-api.h b/include/opal-api.h index 0324110b..36aaf54e 100644 --- a/include/opal-api.h +++ b/include/opal-api.h @@ -1303,6 +1303,7 @@ enum { enum { OPAL_IMC_COUNTERS_NEST = 1, OPAL_IMC_COUNTERS_CORE = 2, + OPAL_IMC_COUNTERS_TRACE = 3, }; |

