summaryrefslogtreecommitdiffstats
path: root/src/import/hwpf
diff options
context:
space:
mode:
authorRichard J. Knight <rjknight@us.ibm.com>2017-09-06 11:59:01 -0500
committerChristian R. Geddes <crgeddes@us.ibm.com>2018-09-06 11:26:21 -0500
commitbb6dc0455116376808c3bc090ceb58d80c9d7a90 (patch)
tree4afc2393a47b58a2b84f975f303677c22c6c08ac /src/import/hwpf
parentfd77849e3981e7a6e463d35c748ecb53b6a5dd81 (diff)
downloadtalos-hostboot-bb6dc0455116376808c3bc090ceb58d80c9d7a90.tar.gz
talos-hostboot-bb6dc0455116376808c3bc090ceb58d80c9d7a90.zip
Add prototype for releasing platform data pointer storage function
Change-Id: I94dbc2125a2c8e0a75f35df067f14c4ca01463d0 CQ:SW401034 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/45718 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+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: PPE CI <ppe-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/45727 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import/hwpf')
-rw-r--r--src/import/hwpf/fapi2/include/collect_reg_ffdc.H10
-rw-r--r--src/import/hwpf/fapi2/include/ffdc.H10
-rw-r--r--src/import/hwpf/fapi2/include/utils.H8
3 files changed, 24 insertions, 4 deletions
diff --git a/src/import/hwpf/fapi2/include/collect_reg_ffdc.H b/src/import/hwpf/fapi2/include/collect_reg_ffdc.H
index bf62d7b25..aa5dd5176 100644
--- a/src/import/hwpf/fapi2/include/collect_reg_ffdc.H
+++ b/src/import/hwpf/fapi2/include/collect_reg_ffdc.H
@@ -382,6 +382,12 @@ ReturnCode collectRegisterData(std::vector<T>& i_addresses, U& i_reader,
if(l_rc)
{
l_data = 0xbaddbadd;
+
+#ifdef __DELETE_PLATFORMDATA_SUPPORTED
+ // delete the platform log if it exits
+ deletePlatformDataPointer(l_rc);
+#endif
+
}
else
{
@@ -418,6 +424,10 @@ ReturnCode collectRegisterAndAddressData(std::vector<T>& i_addresses, U& i_reade
if(l_rc)
{
l_data = 0xbaddbadd;
+#ifdef __DELETE_PLATFORMDATA_SUPPORTED
+ // delete the platform data pointer if it exists
+ deletePlatformDataPointer(l_rc);
+#endif
}
else
{
diff --git a/src/import/hwpf/fapi2/include/ffdc.H b/src/import/hwpf/fapi2/include/ffdc.H
index 28976a44c..48a8979bd 100644
--- a/src/import/hwpf/fapi2/include/ffdc.H
+++ b/src/import/hwpf/fapi2/include/ffdc.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* Contributors Listed Below - COPYRIGHT 2015,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -142,7 +142,7 @@ class FirstFailureData
inline void* releaseData(void)
{
void* l_pData = iv_info;
- iv_info = NULL;
+ iv_info = nullptr;
return l_pData;
}
@@ -213,7 +213,11 @@ class FirstFailureData
///
inline void* getPlatDataPtr()
{
- return iv_platDataPtr;
+ void* l_platDataPtr = iv_platDataPtr;
+
+ iv_platDataPtr = nullptr;
+
+ return l_platDataPtr;
};
///
diff --git a/src/import/hwpf/fapi2/include/utils.H b/src/import/hwpf/fapi2/include/utils.H
index cd6a27717..8534d3bdb 100644
--- a/src/import/hwpf/fapi2/include/utils.H
+++ b/src/import/hwpf/fapi2/include/utils.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2017 */
+/* Contributors Listed Below - COPYRIGHT 2015,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -130,6 +130,12 @@ void createPlatLog(
);
///
+/// @brief delete platform data ptr - free platform data from the
+// passed in RC.
+///
+void deletePlatformDataPointer(fapi2::ReturnCode& io_rc);
+
+///
/// @brief Associate an error to PRD PLID
///
/// @param[in] i_target Reference to target
OpenPOWER on IntegriCloud