1*** Settings ***
2Documentation       This suite tests checkstop operations through BMC using
3...                 pdbg utility during HOST Boot path.
4
5Resource            ../../lib/openbmc_ffdc.robot
6Resource            ../../lib/openbmc_ffdc_utils.robot
7Resource            ../../lib/openbmc_ffdc_methods.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          Host_boot_RAS
23
24*** Variables ***
25${stack_mode}       normal
26
27*** Test Cases ***
28
29Verify Pdbg Recoverable Callout Handling For MCA During Host Boot
30
31    [Documentation]  Verify recoverable callout handling for MCACALIFIR
32    ...              using pdbg tool during Host Boot path.
33    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_MCA_During_Host_Boot
34
35    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  MCACALIFIR_RECV1
36    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}mcacalfir_th1
37
38    Inject Error At HOST Boot Path  ${value[0]}  ${value[1]}
39    ...  ${value[2]}  ${err_log_path}
40
41#  Memory buffer (MCIFIR) related error injection.
42
43Verify Pdbg Recoverable Callout Handling For MCI During Host Boot
44    [Documentation]  Verify recoverable callout handling for MCI
45    ...              using pdbg tool during Host Boot path.
46    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_MCI_During_Host_Boot
47
48    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  MCI_RECV1
49    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}mcifir_th1
50
51    Inject Error At HOST Boot Path  ${value[0]}  ${value[1]}
52    ...  ${value[2]}  ${err_log_path}
53
54
55Verify Pdbg Recoverable Callout Handling For NXDMAENG During Host Boot
56    [Documentation]  Verify recoverable callout handling for  NXDMAENG
57    ...              using pdbg tool during Host Boot path.
58    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_NXDMAENG_During_Host_Boot
59
60    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  NX_RECV1
61    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}nxfir_th1
62
63    Inject Error At HOST Boot Path  ${value[0]}  ${value[1]}
64    ...  ${value[2]}  ${err_log_path}
65
66
67#  L2FIR related error injection.
68
69Verify Pdbg Recoverable Callout Handling For L2FIR During Host Boot
70    [Documentation]  Verify recoverable callout handling for L2FIR
71    ...              using pdbg tool during Host Boot path.
72    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_L2FIR_During_Host_Boot
73
74    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  L2FIR_RECV1
75    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
76    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}l2fir_th1
77
78    Inject Error At HOST Boot Path  ${translated_fir}  ${value[1]}
79    ...  ${value[2]}  ${err_log_path}
80
81
82# On chip controller (OCCFIR) related error injection.
83
84Verify Pdbg Recoverable Callout Handling For OCC During Host Boot
85    [Documentation]  Verify recoverable callout handling for OCCFIR
86    ...              using pdbg tool during Host Boot path.
87    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_OCC_During_Host_Boot
88
89    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  OCCFIR_RECV1
90    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}occfir_th1
91
92
93    Inject Error At HOST Boot Path  ${value[0]}  ${value[1]}
94    ...  ${value[2]}  ${err_log_path}
95
96# Nest control vunit (NCUFIR) related error injection.
97
98Verify Pdbg Recoverable Callout Handling For NCUFIR During Host Boot
99    [Documentation]  Verify recoverable callout handling for NCUFIR
100    ...              using pdbg tool during Host Boot path.
101    [Tags]  Verify_Pdbg_Recoverable_Callout_Handling_For_NCUFIR_During_Host_Boot
102
103    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  NCUFIR_RECV1
104    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
105    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}ncufir_th1
106
107    Inject Error At HOST Boot Path  ${translated_fir}  ${value[1]}
108    ...  ${value[2]}  ${err_log_path}
109
110Verify Pdbg Unrecoverable Callout Handling For NCUFIR During Host Boot
111    [Documentation]  Verify unrecoverable callout handling for NCUFIR
112    ...              using pdbg tool during Host Boot path.
113    [Tags]  Verify_Pdbg_Unrecoverable_Callout_Handling_For_NCUFIR_During_Host_Boot
114
115    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  NCUFIR_UE
116    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
117    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}ncufir_ue
118    Inject Error At HOST Boot Path  ${value[0]}  ${value[1]}
119    ...  ${value[2]}  ${err_log_path}
120
121Verify Pdbg Unrecoverable Callout Handling For L3FIR During Host Boot
122    [Documentation]  Verify unrecoverable callout handling for L3FIR
123    ...              using pdbg tool during Host Boot path.
124    [Tags]  Verify_Pdbg_Unrecoverable_Callout_Handling_For_L3FIR_During_Host_Boot
125
126    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  L3FIR_UE
127    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
128    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}l3fir_ue
129    Inject Error At HOST Boot Path  ${value[0]}  ${value[1]}
130    ...  ${value[2]}  ${err_log_path}
131
132Verify Pdbg Unrecoverable Callout Handling For L2FIR During Host Boot
133    [Documentation]  Verify unrecoverable callout handling for L2FIR
134    ...              using pdbg tool during Host Boot path.
135    [Tags]  Verify_Pdbg_Unrecoverable_Callout_Handling_For_L2FIR_During_Host_Boot
136
137    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  L2FIR_UE
138    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
139    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}l2fir_ue
140    Inject Error At HOST Boot Path  ${value[0]}  ${value[1]}
141    ...  ${value[2]}  ${err_log_path}
142
143Verify Pdbg Unrecoverable Callout Handling For NXDMAENG During Host Boot
144    [Documentation]  Verify unrecoverable callout handling for NXDMAENG
145    ...              using pdbg tool during Host Boot path.
146    [Tags]  Verify_Pdbg_Unrecoverable_Callout_Handling_For_NXDMAENG_During_Host_Boot
147
148    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  NX_UE
149    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}nxfir_ue
150    Inject Error At HOST Boot Path  ${value[0]}  ${value[1]}
151    ...  ${value[2]}  ${err_log_path}
152
153Verify Pdbg Unrecoverable Callout Handling For CXA During Host Boot
154    [Documentation]  Verify unrecoverable callout handling for CXAFIR
155    ...              using pdbg tool during Host Boot path.
156    [Tags]  Verify_Pdbg_Unrecoverable_Callout_Handling_For_CXA_During_Host_Boot
157
158    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  CXA_UE
159    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}cxafir_ue
160    Inject Error At HOST Boot Path  ${value[0]}  ${value[1]}
161    ...  ${value[2]}  ${err_log_path}
162
163Verify Pdbg Unrecoverable Callout Handling For MCA During Host Boot
164    [Documentation]  Verify unrecoverable callout handling for MCACALIFIR
165    ...              using pdbg tool during Host Boot path.
166    [Tags]  Verify_Pdbg_Unrecoverable_Callout_Handling_For_MCA_During_Host_Boot
167
168    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  MCACALIFIR_UE
169    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}mcacalfir
170    Inject Error At HOST Boot Path  ${value[0]}  ${value[1]}
171    ...  ${value[2]}  ${err_log_path}
172
173Verify Pdbg Unrecoverable Callout Handling For MCI During Host Boot
174    [Documentation]  Verify unrecoverable callout handling for MCI
175    ...              using pdbg tool during Host Boot path.
176    [Tags]  Verify_Pdbg_Unrecoverable_Callout_Handling_For_MCI_During_Host_Boot
177
178    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  MCI_UE
179    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}mcifir
180    Inject Error At HOST Boot Path  ${value[0]}  ${value[1]}
181    ...  ${value[2]}  ${err_log_path}
182
183Verify Pdbg Unrecoverable Callout Handling For CoreFIR During Host Boot
184    [Documentation]  Verify unrecoverable callout handling for CoreFIR
185    ...              using pdbg tool during Host Boot path.
186    [Tags]  Verify_Pdbg_Unrecoverable_Callout_Handling_For_CoreFIR_During_Host_Boot
187
188    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  COREFIR_UE
189    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
190    Disable CPU States Through HOST
191    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}corefir_ue
192    Inject Error At HOST Boot Path  ${value[0]}  ${value[1]}
193    ...  ${value[2]}  ${err_log_path}
194