summaryrefslogtreecommitdiffstats
path: root/src/include/usr
diff options
context:
space:
mode:
authorBrian Horton <brianh@linux.ibm.com>2012-05-30 15:18:33 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-06-11 15:22:24 -0500
commitfffa10e2abde6ee52b9d3dec77ca669867625d87 (patch)
tree433d15df7034cddb0f200e3528129aec67755a51 /src/include/usr
parent13bb136b9d635d3737ae270d8dc9c0924a5495cf (diff)
downloadtalos-hostboot-fffa10e2abde6ee52b9d3dec77ca669867625d87.tar.gz
talos-hostboot-fffa10e2abde6ee52b9d3dec77ca669867625d87.zip
HWAS code common between hostboot and FSP
Corrections to common and hostboot platform-specific code to make this code work for both hostboot and FSP. In addition, make printing of HUID consistant with other previous changes. Also, added hwas/common files to fsp distribution tools so that they are included in the fsp.tar for common usage. Change-Id: Ia761606ab446dd794bf8e112430cc2e072f46991 RTC: 39793 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1130 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr')
-rw-r--r--src/include/usr/hwas/common/hwas.H (renamed from src/include/usr/hwas/hwas.H)2
-rw-r--r--src/include/usr/hwas/common/hwasCommon.H (renamed from src/include/usr/hwas/hwasCommon.H)52
-rw-r--r--src/include/usr/hwas/common/hwasError.H40
-rw-r--r--src/include/usr/hwas/common/hwas_reasoncodes.H (renamed from src/include/usr/hwas/hwas_reasoncodes.H)0
-rw-r--r--src/include/usr/hwas/deconfigGard.H1
-rw-r--r--src/include/usr/hwas/hostbootIstep.H (renamed from src/include/usr/hwas/plat/hostbootIstep.H)45
-rw-r--r--src/include/usr/hwas/hwasError.H39
-rw-r--r--src/include/usr/hwas/hwasPlatAssert.H60
-rw-r--r--src/include/usr/hwas/hwasPlatError.H (renamed from src/include/usr/hwas/plat/error.H)49
-rw-r--r--src/include/usr/hwas/hwasPlatTrace.H (renamed from src/include/usr/hwas/plat/hwasPlatTrace.H)55
-rw-r--r--src/include/usr/isteps/istep06list.H6
11 files changed, 211 insertions, 138 deletions
diff --git a/src/include/usr/hwas/hwas.H b/src/include/usr/hwas/common/hwas.H
index 8d5c7fbb6..d1f56885e 100644
--- a/src/include/usr/hwas/hwas.H
+++ b/src/include/usr/hwas/common/hwas.H
@@ -39,7 +39,7 @@
// Includes
/******************************************************************************/
#include <stdint.h>
-#include <errl/errlentry.H>
+#include <hwas/common/hwasError.H>
namespace HWAS
{
diff --git a/src/include/usr/hwas/hwasCommon.H b/src/include/usr/hwas/common/hwasCommon.H
index 412fe81ef..00eab2f55 100644
--- a/src/include/usr/hwas/hwasCommon.H
+++ b/src/include/usr/hwas/common/hwasCommon.H
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/usr/hwas/hwasCommon.H $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2012
-//
-// 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
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/include/usr/hwas/common/hwasCommon.H $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2012
+ *
+ * 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_TAG
+ */
/**
* @file hwasCommon.H
*
@@ -32,7 +33,6 @@
// 'system' headers
#include <stdint.h>
-#include <errl/errlentry.H>
#include <targeting/common/target.H>
#include <targeting/common/targetservice.H>
@@ -41,7 +41,11 @@
// following file needs to do
// #define HWAS_DBG(_fmt_, _args_...)
// #define HWAS_ERR(_fmt_, _args_...)
-#include <hwasPlatTrace.H>
+#include <hwas/hwasPlatTrace.H>
+
+// following file needs to do
+// #define HWAS_ASSERT(_expr_...)
+#include <hwas/hwasPlatAssert.H>
namespace HWAS
{
diff --git a/src/include/usr/hwas/common/hwasError.H b/src/include/usr/hwas/common/hwasError.H
new file mode 100644
index 000000000..d2ced14e0
--- /dev/null
+++ b/src/include/usr/hwas/common/hwasError.H
@@ -0,0 +1,40 @@
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/include/usr/hwas/common/hwasError.H $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2012
+ *
+ * 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_TAG
+ */
+#ifndef __HWAS_ERROR_H
+#define __HWAS_ERROR_H
+
+/**
+* @file hwas/hwasError.H
+*
+* @brief Common header to abstract away error handling differences between
+* platforms
+*/
+
+//******************************************************************************
+// Includes
+//******************************************************************************
+
+#include <hwas/hwasPlatError.H>
+
+#endif // __HWAS_ERROR_H
diff --git a/src/include/usr/hwas/hwas_reasoncodes.H b/src/include/usr/hwas/common/hwas_reasoncodes.H
index a7ad56aae..a7ad56aae 100644
--- a/src/include/usr/hwas/hwas_reasoncodes.H
+++ b/src/include/usr/hwas/common/hwas_reasoncodes.H
diff --git a/src/include/usr/hwas/deconfigGard.H b/src/include/usr/hwas/deconfigGard.H
index c3208e71e..b3045d8b4 100644
--- a/src/include/usr/hwas/deconfigGard.H
+++ b/src/include/usr/hwas/deconfigGard.H
@@ -35,6 +35,7 @@
#include <sys/sync.h>
#include <util/singleton.H>
#include <errl/errlentry.H>
+#include <hwas/common/hwasCommon.H>
#include <targeting/common/attributes.H>
namespace HWAS
diff --git a/src/include/usr/hwas/plat/hostbootIstep.H b/src/include/usr/hwas/hostbootIstep.H
index b0338b543..f770a0bfd 100644
--- a/src/include/usr/hwas/plat/hostbootIstep.H
+++ b/src/include/usr/hwas/hostbootIstep.H
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/usr/hwas/plat/hostbootIstep.H $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2012
-//
-// 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
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/include/usr/hwas/hostbootIstep.H $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2012
+ *
+ * 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_TAG
+ */
/**
* @file hostbootIstep.H
*
diff --git a/src/include/usr/hwas/hwasError.H b/src/include/usr/hwas/hwasError.H
deleted file mode 100644
index 884575093..000000000
--- a/src/include/usr/hwas/hwasError.H
+++ /dev/null
@@ -1,39 +0,0 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/usr/hwas/hwasError.H $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2012
-//
-// 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
-#ifndef __HWAS_ERROR_H
-#define __HWAS_ERROR_H
-
-/**
-* @file hwas/hwasError.H
-*
-* @brief Common header to abstract away error handling differences between
-* platforms
-*/
-
-//******************************************************************************
-// Includes
-//******************************************************************************
-
-#include <hwas/plat/error.H>
-
-#endif // __HWAS_ERROR_H
diff --git a/src/include/usr/hwas/hwasPlatAssert.H b/src/include/usr/hwas/hwasPlatAssert.H
new file mode 100644
index 000000000..cc53f2a4d
--- /dev/null
+++ b/src/include/usr/hwas/hwasPlatAssert.H
@@ -0,0 +1,60 @@
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/include/usr/hwas/hwasPlatAssert.H $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2012
+ *
+ * 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_TAG
+ */
+#ifndef __HWAS_PLAT_ASSERT_H
+#define __HWAS_PLAT_ASSERT_H
+
+/**
+ * @file hwas/hwasPlatAssert.H
+ * @brief Forward common hwas assert requests to the platform specific
+ * handlers
+ *
+ * There are two different assert types provided:
+ * Standard assert behavior:
+ * assert(foo)
+ *
+ * Standard assert behavior with a custom trace message:
+ * assert(foo, "This is a trace %d", 1234)
+ */
+
+//******************************************************************************
+// Includes
+//******************************************************************************
+
+#include <assert.h>
+
+/**
+ * @brief Forward common hwas assert requests to platform specific handler
+ *
+ * @par Detailed Description:
+ * Forwards assert request to platform specific assert macro which verifies
+ * condition, calls custom trace if provided, and ultimately calls platform
+ * assert
+ *
+ * @param[in] expr,...
+ * Printf-like expression to act as the assert message
+ */
+#define HWAS_ASSERT(expr,...) \
+ assert(expr,__VA_ARGS__)
+
+#endif // __HWAS_PLAT_ASSERT_H
diff --git a/src/include/usr/hwas/plat/error.H b/src/include/usr/hwas/hwasPlatError.H
index c578f5efa..be382e290 100644
--- a/src/include/usr/hwas/plat/error.H
+++ b/src/include/usr/hwas/hwasPlatError.H
@@ -1,30 +1,31 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/usr/hwas/plat/error.H $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2012
-//
-// 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
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/include/usr/hwas/hwasPlatError.H $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2012
+ *
+ * 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_TAG
+ */
#ifndef __HWAS_PLAT_ERROR_H
#define __HWAS_PLAT_ERROR_H
/**
-* @file hwas/plat/error.H
+* @file hwas/hwasPlatError.H
*
* @brief Adapts platform neutral error log requests to the platform
*/
@@ -36,7 +37,7 @@
// Include the platform specific errlentry.H file and pick up the platform
// specific errlHndlt_t typedef. This is enough for common code to use pass
// errlHndl_t pointers around and check for NULL
-#include <errl/errlentry.H>
+#include <errl/errlmanager.H>
namespace HWAS
{
diff --git a/src/include/usr/hwas/plat/hwasPlatTrace.H b/src/include/usr/hwas/hwasPlatTrace.H
index a82687c30..fcabb9ba6 100644
--- a/src/include/usr/hwas/plat/hwasPlatTrace.H
+++ b/src/include/usr/hwas/hwasPlatTrace.H
@@ -1,27 +1,28 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/usr/hwas/plat/hwasPlatTrace.H $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2012
-//
-// 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
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/include/usr/hwas/hwasPlatTrace.H $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2012
+ *
+ * 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_TAG
+ */
/**
- * @file hwasPlatTrace.H
+ * @file hwas/hwasPlatTrace.H
*
* @brief Defines platform interfaces and whatnot needed for trace in the
* HWAS common and platform specific functions
@@ -36,8 +37,12 @@
//******************************************************************************
// Trace descriptors that are defined in a C file
//******************************************************************************
-extern trace_desc_t *g_trac_dbg_hwas; // debug - fast
-extern trace_desc_t *g_trac_imp_hwas; // important - slow
+namespace HWAS
+{
+ typedef trace_desc_t* HWAS_TD_t;
+ extern HWAS_TD_t g_trac_dbg_hwas; // debug - fast
+ extern HWAS_TD_t g_trac_imp_hwas; // important - slow
+}
// Debug traces (go into fast trace buffer that can wrap often)
#define HWAS_DBG(_fmt_, _args_...) \
diff --git a/src/include/usr/isteps/istep06list.H b/src/include/usr/isteps/istep06list.H
index 69465b7ab..d736356e9 100644
--- a/src/include/usr/isteps/istep06list.H
+++ b/src/include/usr/isteps/istep06list.H
@@ -5,7 +5,7 @@
*
* IBM CONFIDENTIAL
*
- * COPYRIGHT International Business Machines Corp. 2011 - 2012
+ * COPYRIGHT International Business Machines Corp. 2011-2012
*
* p1
*
@@ -37,8 +37,8 @@
#include <initservice/initsvcstructs.H>
#include <initservice/initsvcreasoncodes.H>
-#include <hwas/hwas.H>
-#include <hwas/plat/hostbootIstep.H>
+#include <hwas/common/hwas.H>
+#include <hwas/hostbootIstep.H>
namespace INITSERVICE
OpenPOWER on IntegriCloud