blob: ee06d7065cf43352399c6f86de9c69c29eb1c736 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
.. _opal-imc-counters:
OPAL_IMC_COUNTERS_INIT
==============================
OPAL call interface to initialize In-memory collection
infrastructure. Call does multiple scom writes on each
invocation for Core/Trace IMC initialization. And for the
Nest IMC, at this point, call is a no-op and returns
OPAL_SUCCESS. Incase of kexec, OS driver should first
stop the engine via OPAL_IMC_COUNTER_STOP(and then
free the memory if allocated, for nest memory is
mmapped). Incase of kdump, OS driver should stop
the engine via OPAL_IMC_COUNTER_STOP.
OPAL does sanity checks to detect unknown or
unsupported IMC device type and nest units.
check_imc_device_type() function removes
unsupported IMC device type. disable_unavailable_units()
removes unsupported nest units by the microcode.
This way OPAL can lock down and advertise only
supported device type and nest units.
Parameters
----------
``uint32_t type``
This parameter specifies the imc counter domain.
The value can be 'OPAL_IMC_COUNTERS_NEST', 'OPAL_IMC_COUNTERS_CORE'
or 'OPAL_IMC_COUNTERS_TRACE'.
``uint64_t addr``
This parameter must have a non-zero value.
This value must be a physical address of the core.
``uint64_t cpu_pir``
This parameter specifices target cpu pir
Returns
-------
OPAL_PARAMETER
In case of unsupported ``type``
OPAL_HARDWARE
If any error in setting up the hardware.
OPAL_SUCCESS
On succesfully initialized or even if init operation is a no-op.
OPAL_IMC_COUNTERS_START
============================
OPAL call interface for starting the In-Memory Collection
counters for a specified domain (NEST/CORE/TRACE).
Parameters
----------
``uint32_t type``
This parameter specifies the imc counter domain.
The value can be 'OPAL_IMC_COUNTERS_NEST',
'OPAL_IMC_COUNTERS_CORE' or 'OPAL_IMC_COUNTERS_TRACE'.
``uint64_t cpu_pir``
This parameter specifices target cpu pir
Returns
-------
OPAL_PARAMETER
In case of Unsupported ``type``
OPAL_HARDWARE
If any error in setting up the hardware.
OPAL_SUCCESS
On successful execution of the operation for the given ``type``.
OPAL_IMC_COUNTERS_STOP
======================
OPAL call interface for stoping In-Memory
Collection counters for a specified domain (NEST/CORE/TRACE).
STOP should always be called after a related START.
While STOP *may* run successfully without an associated
START call, this is not gaurenteed.
Parameters
----------
``uint32_t type``
This parameter specifies the imc counter domain.
The value can be 'OPAL_IMC_COUNTERS_NEST',
'OPAL_IMC_COUNTERS_CORE' or 'OPAL_IMC_COUNTERS_TRACE'
``uint64_t cpu_pir``
This parameter specifices target cpu pir
Returns
-------
OPAL_PARAMETER
In case of Unsupported ``type``
OPAL_HARDWARE
If any error in setting up the hardware.
OPAL_SUCCESS
On successful execution of the operation for the given ``type``.
|