summaryrefslogtreecommitdiffstats
path: root/import/chips/p9/procedures/ppe_closed/lib
diff options
context:
space:
mode:
authorYue Du <daviddu@us.ibm.com>2017-11-05 16:57:15 -0600
committerJoshua Hunsberger <jahunsbe@us.ibm.com>2018-02-05 15:36:34 -0600
commitcd86832be034ccd5fd7ea385f6ad4674b310c147 (patch)
tree9dd1304bd21404e5fd7706d4746d40e0a452082b /import/chips/p9/procedures/ppe_closed/lib
parenta01e584974c182823526e08676e143c6536b8f7b (diff)
downloadtalos-hcode-cd86832be034ccd5fd7ea385f6ad4674b310c147.tar.gz
talos-hcode-cd86832be034ccd5fd7ea385f6ad4674b310c147.zip
STOP/PState: SGPE/PGPE Error Handling Support
Upon PGPE Halt 1) SGPE performs STOP Recovery Trigger to set a malfunction alert and removes PGPE IPCs from wake-up decisions. 2) CME is interrupted by QPPM OCC Heartbeat Lost that PGPE stopped updating Upon SGPE Halt 1) PGPE moves to Psafe 2) PGPE performs STOP Recovery Trigger to set a malfunction alert. This commit also includes SGPE Panic Code Cleanup such as debug halt support. However PGPE Panic Code Cleanup is dealt in a different commit Key_Cronus_Test=PM_REGRESS Change-Id: I71d1af70dfb28a9798d9f8e7a64544628548a1db Original-Change-Id: I893aa1ef21d2f684722b8c10dbbeb92b9505c1c4 CQ: SW410252 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/49275 Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Tested-by: Cronus HW CI <cronushw-ci+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Michael S. Floyd <mfloyd@us.ibm.com> Reviewed-by: RAHUL BATRA <rbatra@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Diffstat (limited to 'import/chips/p9/procedures/ppe_closed/lib')
-rw-r--r--import/chips/p9/procedures/ppe_closed/lib/p9_stop_recovery_trigger.c61
1 files changed, 61 insertions, 0 deletions
diff --git a/import/chips/p9/procedures/ppe_closed/lib/p9_stop_recovery_trigger.c b/import/chips/p9/procedures/ppe_closed/lib/p9_stop_recovery_trigger.c
new file mode 100644
index 00000000..34dddf79
--- /dev/null
+++ b/import/chips/p9/procedures/ppe_closed/lib/p9_stop_recovery_trigger.c
@@ -0,0 +1,61 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: import/chips/p9/procedures/ppe_closed/lib/p9_stop_recovery_trigger.c $ */
+/* */
+/* OpenPOWER HCODE Project */
+/* */
+/* COPYRIGHT 2017,2018 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+#include "stdint.h"
+#include "pk.h"
+#include "ppe42_scom.h"
+#include "gpehw_common.h"
+#include "p9_stop_recovery_trigger.h"
+
+// When an error occurs that affects the STOP portion of the PM subsystem,
+// HYP is notified via a malfunction alert that is injected by programming
+// the ADU AFTER a respective bit is set in the OCC LFIR.
+
+void
+p9_stop_recovery_trigger()
+{
+ uint64_t scom_data = 0;
+ PK_TRACE_INF("WARNING: STOP RECOVERY TRIGGER!");
+
+ //1. Set ADU lock for exclusive use for a timeout of 500ms.
+
+ do
+ {
+
+ GPE_PUTSCOM(0x90001, 0x0010000000000000ull);
+ GPE_GETSCOM(0x90001, scom_data);
+
+ }
+ while (!(scom_data & 0x0010000000000000ull));
+
+ //2. Cleanup/reset ADU
+ GPE_PUTSCOM(0x90001, 0x1810000000000000ull);
+
+ //3. Setup PowerBus 'address' field for malf alert
+ GPE_PUTSCOM(0x90000, 0x0000100000000000ull);
+
+ //4. Setup PowerBus command type and launch malfunction
+ GPE_PUTSCOM(0x90001, 0x2210A03104000000ull);
+}
OpenPOWER on IntegriCloud