1*** Settings ***
2Documentation       This suite tests checkstop operations through BMC using
3...                 pdbg utility.
4
5Resource            ../../lib/openbmc_ffdc.robot
6Resource            ../../lib/openbmc_ffdc_methods.robot
7Resource            ../../lib/openbmc_ffdc_utils.robot
8Resource            ../../openpower/ras/ras_utils.robot
9Variables           ../../lib/ras/variables.py
10Variables           ../../data/variables.py
11
12Library             DateTime
13Library             OperatingSystem
14Library             random
15Library             Collections
16
17Suite Setup         RAS Suite Setup
18Test Setup          RAS Test Setup
19Test Teardown       FFDC On Test Case Fail
20Suite Teardown      RAS Suite Cleanup
21
22Force Tags          BMC_RAS
23
24*** Variables ***
25${stack_mode}       normal
26
27
28*** Test Cases ***
29
30# Memory Controller Async (MCACALIFIR) related error injection.
31
32Verify Pdbg Recoverable Callout Handling For MCA With Threshold 1
33    [Documentation]  Verify recoverable callout handling for MCACALIFIR
34    ...              with threshold 1 using pdbg tool.
35    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_MCA_With_Threshold_1
36
37    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  MCACALIFIR_RECV1
38    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}mcacalfir_th1
39    Inject Recoverable Error With Threshold Limit
40    ...  BMC  ${value[0]}  ${value[1]}  1  ${value[2]}  ${err_log_path}
41
42Verify Pdbg Recoverable Callout Handling For MCA With Threshold 32
43    [Documentation]  Verify recoverable callout handling for MCACALIFIR
44    ...              with threshold 32 using pdbg tool.
45    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_MCA_With_Threshold_32
46
47    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  MCACALIFIR_RECV32
48    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}mcacalfir_th32
49    Inject Recoverable Error With Threshold Limit
50    ...  BMC  ${value[0]}  ${value[1]}  32  ${value[2]}  ${err_log_path}
51
52Verify Pdbg Unrecoverable Callout Handling For MCA
53    [Documentation]  Verify unrecoverable callout handling for MCACALIFIR
54    ...              with pdbg tool.
55    [Tags]  Verify_Pdbg_Unrecoverable_Callout_Handling_For_MCA
56
57    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  MCACALIFIR_UE
58    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}mcacalfir
59    Inject Unrecoverable Error  BMC
60    ...  ${value[0]}  ${value[1]}  1  ${value[2]}  ${err_log_path}
61
62#  Memory controller Interface (MCIFIR) related error injection.
63
64Verify Pdbg Recoverable Callout Handling For MCI With Threshold 1
65    [Documentation]  Verify recoverable callout handling for MCI
66    ...              with threshold 1 using pdbg tool.
67    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_MCI_With_Threshold_1
68
69    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  MCI_RECV1
70    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}mcifir_th1
71    Inject Recoverable Error With Threshold Limit
72    ...  BMC  ${value[0]}  ${value[1]}  1  ${value[2]}  ${err_log_path}
73
74Verify Pdbg Unrecoverable Callout Handling For MCI
75    [Documentation]  Verify unrecoverable callout handling for mci
76    ...              with pdbg tool.
77    [Tags]  Verify_Pdbg_Unrecoverable_Callout_Handling_For_MCI
78
79    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  MCI_UE
80    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}mcifir
81    Inject Unrecoverable Error  BMC
82    ...  ${value[0]}  ${value[1]}  1  ${value[2]}  ${err_log_path}
83
84
85# CAPP accelerator (CXAFIR) related error injection.
86
87Verify Pdbg Recoverable Callout Handling For CXA With Threshold 5
88    [Documentation]  Verify recoverable callout handling for CXA
89    ...              with threshold 5 using pdbg tool.
90    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_CXA_With_Threshold_5
91
92    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  CXA_RECV5
93    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}cxafir_th5
94    Inject Recoverable Error With Threshold Limit
95    ...  BMC  ${value[0]}  ${value[1]}  5  ${value[2]}  ${err_log_path}
96
97Verify Pdbg Recoverable Callout Handling For CXA With Threshold 32
98    [Documentation]  Verify recoverable callout handling for CXA
99    ...              with threshold 32 using pdbg tool.
100    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_CXA_With_Threshold_32
101
102    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  CXA_RECV32
103    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}cxafir_th32
104    Inject Recoverable Error With Threshold Limit
105    ...  BMC  ${value[0]}  ${value[1]}  32  ${value[2]}  ${err_log_path}
106
107Verify Pdbg Unrecoverable Callout Handling For CXA
108    [Documentation]  Verify unrecoverable callout handling for CXAFIR
109    ...              with pdbg tool.
110    [Tags]  Verify_Pdbg_Unrecoverable_Callout_Handling_For_CXA
111
112    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  CXA_UE
113    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}cxafir_ue
114    Inject Unrecoverable Error  BMC
115    ...  ${value[0]}  ${value[1]}  1  ${value[2]}  ${err_log_path}
116
117#  Optical BUS (OBUSFIR) related error injection.
118
119Verify Pdbg Recoverable Callout Handling For OBUS With Threshold 32
120    [Documentation]  Verify recoverable callout handling for OBUS
121    ...              with threshold 32 using pdbg tool.
122    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_OBUS_With_Threshold_32
123
124    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  OBUS_RECV32
125    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}obusfir_th32
126    Inject Recoverable Error With Threshold Limit
127    ...  BMC  ${value[0]}  ${value[1]}  32  ${value[2]}  ${err_log_path}
128
129# NVIDIA graphics processing units (NPU0FIR) related error injection.
130
131Verify Pdbg Recoverable Callout Handling For NPU0 With Threshold 32
132    [Documentation]  Verify recoverable callout handling for NPU0
133    ...              with threshold 32 using pdbg tool.
134    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_NPU0_With_Threshold_32
135
136    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  NPU0_RECV32
137    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}npu0fir_th32
138    Inject Recoverable Error With Threshold Limit
139    ...  BMC  ${value[0]}  ${value[1]}  32  ${value[2]}  ${err_log_path}
140
141#  NEST accelerator DMA Engine (NXDMAENGFIR) related error injection.
142
143Verify Pdbg Recoverable Callout Handling For NXDMAENG With Threshold 1
144    [Documentation]  Verify recoverable callout handling for NXDMAENG
145    ...              with threshold 1 using pdbg tool.
146    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_NXDMAENG_With_Threshold_1
147
148    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  NX_RECV1
149    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}nxfir_th1
150    Inject Recoverable Error With Threshold Limit
151    ...  BMC  ${value[0]}  ${value[1]}  1  ${value[2]}  ${err_log_path}
152
153
154Verify Pdbg Recoverable Callout Handling For NXDMAENG With Threshold 32
155    [Documentation]  Verify recoverable callout handling for NXDMAENG
156    ...              with threshold 32 using pdbg tool.
157    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_NXDMAENG_With_Threshold_32
158
159    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  NX_RECV32
160    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}nxfir_th32
161    Inject Recoverable Error With Threshold Limit
162    ...  BMC  ${value[0]}  ${value[1]}  32  ${value[2]}  ${err_log_path}
163
164Verify Pdbg Unrecoverable Callout Handling For NXDMAENG
165    [Documentation]  Verify unrecoverable callout handling for NXDMAENG
166    ...              with pdbg tool.
167    [Tags]  Verify_Pdbg_Unrecoverable_Callout_Handling_For_NXDMAENG
168
169    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  NX_UE
170    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}nxfir_ue
171    Inject Unrecoverable Error  BMC
172    ...  ${value[0]}  ${value[1]}  1  ${value[2]}  ${err_log_path}
173
174#  L2FIR related error injection.
175
176Verify Pdbg Recoverable Callout Handling For L2FIR With Threshold 1
177    [Documentation]  Verify recoverable callout handling for L2FIR
178    ...              with threshold 1 using pdbg tool.
179    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_L2FIR_With_Threshold_1
180
181    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  L2FIR_RECV1
182    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
183    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}l2fir_th1
184    Inject Recoverable Error With Threshold Limit
185    ...  BMC  ${translated_fir}  ${value[1]}  1  ${value[2]}  ${err_log_path}
186
187Verify Pdbg Recoverable Callout Handling For L2FIR With Threshold 32
188    [Documentation]  Verify recoverable callout handling for L2FIR
189    ...              with threshold 32 using pdbg tool.
190    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_L2FIR_With_Threshold_32
191
192    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  L2FIR_RECV32
193    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
194    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}l2fir_th32
195    Inject Recoverable Error With Threshold Limit
196    ...  BMC  ${translated_fir}  ${value[1]}  32  ${value[2]}  ${err_log_path}
197
198Verify Pdbg Unrecoverable Callout Handling For L2FIR
199    [Documentation]  Verify unrecoverable callout handling for L2FIR
200    ...              with pdbg tool.
201    [Tags]  Verify_Pdbg_Unrecoverable_Callout_Handling_For_L2FIR
202
203    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  L2FIR_UE
204    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
205    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}l2fir_ue
206    Inject Unrecoverable Error  BMC
207    ...  ${translated_fir}  ${value[1]}  1  ${value[2]}  ${err_log_path}
208
209#  L3FIR related error injection.
210
211Verify Pdbg Recoverable Callout Handling For L3FIR With Threshold 1
212    [Documentation]  Verify recoverable callout handling for L3FIR
213    ...              with threshold 1 using pdbg tool.
214    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_L3FIR_With_Threshold_1
215
216    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  L3FIR_RECV1
217    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
218    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}l3fir_th1
219    Inject Recoverable Error With Threshold Limit
220    ...  BMC  ${translated_fir}  ${value[1]}  1  ${value[2]}  ${err_log_path}
221
222Verify Pdbg Recoverable Callout Handling For L3FIR With Threshold 32
223    [Documentation]  Verify recoverable callout handling for L3FIR
224    ...              with threshold 32 using pdbg tool.
225    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_L3FIR_With_Threshold_32
226
227    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  L3FIR_RECV32
228    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
229    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}l3fir_th32
230    Inject Recoverable Error With Threshold Limit
231    ...  BMC  ${translated_fir}  ${value[1]}  32  ${value[2]}  ${err_log_path}
232
233Verify Pdbg Unrecoverable Callout Handling For L3FIR
234    [Documentation]  Verify unrecoverable callout handling for L3FIR
235    ...              with pdbg tool.
236    [Tags]  Verify_Pdbg_Unrecoverable_Callout_Handling_For_L3FIR
237
238    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  L3FIR_UE
239    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
240    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}l3fir_ue
241    Inject Unrecoverable Error  BMC
242    ...  ${translated_fir}  ${value[1]}  1  ${value[2]}  ${err_log_path}
243
244# On chip controller (OCCFIR) related error injection.
245
246Verify Pdbg Recoverable Callout Handling For OCC With Threshold 1
247    [Documentation]  Verify recoverable callout handling for OCCFIR
248    ...              with threshold 1 using pdbg tool.
249    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_OCC_With_Threshold_1
250
251    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  OCCFIR_RECV1
252    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}occfir_th1
253    Inject Recoverable Error With Threshold Limit
254    ...  BMC  ${value[0]}  ${value[1]}  1  ${value[2]}  ${err_log_path}
255
256# Core management engine (CMEFIR) related error injection.
257
258Verify Pdbg Recoverable Callout Handling For CMEFIR With Threshold 1
259    [Documentation]  Verify recoverable callout handling for CMEFIR
260    ...              with threshold 1 using pdbg tool.
261    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_CMEFIR_With_Threshold_1
262
263    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  CMEFIR_RECV1
264    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
265    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}cmefir_th1
266    Inject Recoverable Error With Threshold Limit
267    ...  BMC  ${translated_fir}  ${value[1]}  1  ${value[2]}  ${err_log_path}
268
269# Nest control vunit (NCUFIR) related error injection.
270
271Verify Pdbg Recoverable Callout Handling For NCUFIR With Threshold 1
272    [Documentation]  Verify recoverable callout handling for NCUFIR
273    ...              with threshold 1 using pdbg tool.
274    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_NCUFIR_With_Threshold_1
275
276    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  NCUFIR_RECV1
277    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
278    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}ncufir_th1
279    Inject Recoverable Error With Threshold Limit
280    ...  BMC  ${translated_fir}  ${value[1]}  1  ${value[2]}  ${err_log_path}
281
282Verify Pdbg Unrecoverable Callout Handling For NCUFIR
283    [Documentation]  Verify unrecoverable callout handling for NCUFIR
284    ...              with pdbg tool.
285    [Tags]  Verify_Pdbg_Unrecoverable_Callout_Handling_For_NCUFIR
286
287    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  NCUFIR_UE
288    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
289    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}ncufir_ue
290    Inject Unrecoverable Error  BMC
291    ...  ${translated_fir}  ${value[1]}  1  ${value[2]}  ${err_log_path}
292
293# Core FIR related error injection.
294
295Verify Pdbg Recoverable Callout Handling For CoreFIR With Threshold 5
296    [Documentation]  Verify recoverable callout handling for CoreFIR
297    ...              with threshold 5 using pdbg tool.
298    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_CoreFIR_With_Threshold_5
299
300    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  COREFIR_RECV5
301    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
302    Disable CPU States Through HOST
303    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}corefir_th5
304    Inject Recoverable Error With Threshold Limit
305    ...  BMC  ${value[0]}  ${value[1]}  5  ${value[2]}  ${err_log_path}
306
307Verify Pdbg Recoverable Callout Handling For CoreFIR With Threshold 1
308    [Documentation]  Verify recoverable callout handling for CoreFIR
309    ...              with threshold 1 using pdbg tool.
310    [Tags]  Verify_Pdbg_Recoverable_Callout_CoreFIR_Handling_For_With_Threshold_1
311
312    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  COREFIR_RECV1
313    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
314    Disable CPU States Through HOST
315    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}corefir_th1
316    Inject Recoverable Error With Threshold Limit
317    ...  BMC  ${value[0]}  ${value[1]}  1  ${value[2]}  ${err_log_path}
318
319Verify Pdbg Unrecoverable Callout Handling For CoreFIR
320    [Documentation]  Verify unrecoverable callout handling for CoreFIR
321    ...              with pdbg tool.
322    [Tags]  Verify_Pdbg_Unrecoverable_Callout_Handling_For_CoreFIR
323
324    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  COREFIR_UE
325    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
326    Disable CPU States Through HOST
327    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}corefir_ue
328    Inject Unrecoverable Error  BMC
329    ...  ${value[0]}  ${value[1]}  1  ${value[2]}  ${err_log_path}
330
331Verify Pdbg Recoverable Callout Handling For EQFIR With Threshold 32
332    [Documentation]  Verify recoverable callout handling for L3FIR
333    ...              with threshold 32 using pdbg tool.
334    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_EQFIR_With_Threshold_32
335
336    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  EQFIR_RECV32
337    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EQ
338    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}eqfir_th32
339    Inject Recoverable Error With Threshold Limit
340    ...  BMC  ${translated_fir}  ${value[1]}  32  ${value[2]}  ${err_log_path}
341