summaryrefslogtreecommitdiffstats
path: root/src/usr/hwas/testHWP.C
diff options
context:
space:
mode:
authorMark Wenning <wenning@us.ibm.com>2011-10-25 14:23:23 -0500
committerMark W. Wenning <wenning@us.ibm.com>2011-10-26 11:46:13 -0500
commit35a8280b204334d8976faa63a8a79e3630017e86 (patch)
tree29edc2c98249489380e7d29459600101ba787413 /src/usr/hwas/testHWP.C
parent446e41da2bde65a199853230e235b0ffa631b0a8 (diff)
downloadtalos-hostboot-35a8280b204334d8976faa63a8a79e3630017e86.tar.gz
talos-hostboot-35a8280b204334d8976faa63a8a79e3630017e86.zip
Move testHWP to the last substep of HWAS (ISTEP 4)
- fix istep numbering, thanks Dan - remove src/usr/isteps dir Change-Id: I9420b7bddf6f9237045cecf888f01b37afa2df0e Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/459 Tested-by: Jenkins Server Reviewed-by: CAMVAN T. NGUYEN <ctnguyen@us.ibm.com>
Diffstat (limited to 'src/usr/hwas/testHWP.C')
-rw-r--r--src/usr/hwas/testHWP.C95
1 files changed, 95 insertions, 0 deletions
diff --git a/src/usr/hwas/testHWP.C b/src/usr/hwas/testHWP.C
new file mode 100644
index 000000000..ce18e1961
--- /dev/null
+++ b/src/usr/hwas/testHWP.C
@@ -0,0 +1,95 @@
+// IBM_PROLOG_BEGIN_TAG
+// This is an automatically generated prolog.
+//
+// $Source: src/usr/hwas/testHWP.C $
+//
+// IBM CONFIDENTIAL
+//
+// COPYRIGHT International Business Machines Corp. 2011
+//
+// p1
+//
+// Object Code Only (OCO) source materials
+// Licensed Internal Code Source Materials
+// IBM HostBoot Licensed Internal Code
+//
+// The source code for this program is not published or other-
+// wise divested of its trade secrets, irrespective of what has
+// been deposited with the U.S. Copyright Office.
+//
+// Origin: 30
+//
+// IBM_PROLOG_END
+
+/**
+ * @file testHWP.C
+ *
+ * testHWP -this is the last substep of IStep4 (HWAS)
+ *
+ */
+
+
+/******************************************************************************/
+// Includes
+/******************************************************************************/
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <sys/task.h>
+
+#include <trace/interface.H> // trace support
+#include <errl/errlentry.H> // errlHndl_t
+#include <errl/errlmanager.H>
+#include <initservice/taskargs.H> // task args
+
+// pull in stuff to run HW procedure -
+// NOTE: there are extra include paths in the makefile to find the fapi
+// includes:
+// EXTRAINCDIR += ${ROOTPATH}/src/include/usr/ecmddatabuffer
+// EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/fapi
+// EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/plat
+// EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp
+//
+
+#include <fapiTarget.H>
+#include <fapiPlatHwpInvoker.H>
+#include <targeting/targetservice.H>
+
+using namespace fapi;
+using namespace TARGETING;
+
+namespace HWAS
+{
+
+/******************************************************************************/
+// Globals/Constants
+/******************************************************************************/
+extern trace_desc_t *g_trac_hwas;
+
+void testHWP( void * io_pArgs )
+{
+ TASKARGS_INIT_TASKARGS(io_pArgs);
+ errlHndl_t l_err = NULL;
+
+ // Get the master processor chip
+ TARGETING::Target* l_pTarget = NULL;
+ TARGETING::targetService().masterProcChipTargetHandle(l_pTarget);
+
+ // Create a FAPI Target and invoke the hwpInitialTest HWP
+ fapi::Target l_fapiTarget(TARGET_TYPE_PROC_CHIP,
+ reinterpret_cast<void *> (l_pTarget));
+
+ FAPI_INVOKE_HWP(l_err, hwpInitialTest, l_fapiTarget);
+
+ if (l_err)
+ {
+ TRACFCOMP( g_trac_hwas, "testHWP failed, committing errorlog");
+ errlCommit(l_err);
+ }
+
+ TASKARGS_WAIT_AND_ENDTASK();
+}
+
+
+} // namespace
OpenPOWER on IntegriCloud