summaryrefslogtreecommitdiffstats
path: root/import/hwpf/fapi2
diff options
context:
space:
mode:
authorDonald Washburn <dwashbur@us.ibm.com>2017-06-08 10:39:35 -0500
committerJoshua Hunsberger <jahunsbe@us.ibm.com>2017-10-23 17:50:28 -0500
commit176045b1a9d7280c345b97a59a35744e51f29fac (patch)
treeadea54e2ba0259017730edab103a84ef88bd6af3 /import/hwpf/fapi2
parent28b656a07f0b8c698135a0bc77e42edc21be3a98 (diff)
downloadtalos-hcode-176045b1a9d7280c345b97a59a35744e51f29fac.tar.gz
talos-hcode-176045b1a9d7280c345b97a59a35744e51f29fac.zip
Enable and fix error log variable_buffer support.
Errorlog support for the fapi2::variable_buffer type was not enabled in hostboot. Tests showed that when enabled, variable_buffer data was not being propagated properly to the error log. The issue was found to be that the pointer to the variable_buffer's internal data was not being properly passed to an ffdc_t object. Also, transferring the size of the variable_buffer data was not being correctly communicated to an ffdc_t object because a specialization of the getErrorInfoFfdcSize template function is needed. Becuase the specialization of the getErrorInfoFfdcSize function with an ffdc_t parameter did not exist, the code base used the primary function template for the getErrorInfoFfdcSize function which just returns the size of an ffdc_t object passed to it instead of the size of the contained data within the ffdc_t. Changes: * Added specialization of getErrorInfoFfdcSize for fapi2::ffdc_t. * Enabled variable_buffer support in parseErrorInfo.mk. * Added const overload of the pointer() method for the fapi2::buffer and fapi2::variable_buffer classes. This to allow these methods to be used in the set_BUFFER methods that take a const reference to objects of these classes. * Modified parseErrorInfo.pl to generate code to use the above mentioned pointer methods. The adjusted generated code fixes the problem of assigning an incorrect buffer pointer. Change-Id: I96dc89fbb68ee6a153ca43191181c56804b84ae8 RTC: 175239 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41541 Tested-by: Jenkins Server <pfd-jenkins+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: William G. Hoffa <wghoffa@us.ibm.com> Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Diffstat (limited to 'import/hwpf/fapi2')
-rw-r--r--import/hwpf/fapi2/include/buffer.H9
1 files changed, 9 insertions, 0 deletions
diff --git a/import/hwpf/fapi2/include/buffer.H b/import/hwpf/fapi2/include/buffer.H
index 43019030..0015103b 100644
--- a/import/hwpf/fapi2/include/buffer.H
+++ b/import/hwpf/fapi2/include/buffer.H
@@ -401,6 +401,15 @@ class buffer
return &iv_data;
}
+ ///
+ /// @brief Get a pointer to the buffer bits
+ /// @return Pointer to the buffer itself
+ ///
+ inline const T* pointer(void) const
+ {
+ return &iv_data;
+ }
+
// Note: Many (all?) of these are not needed and the compiler complains
// as the cast to T yields a better operator. There are here mainly for
// documenation purposes.
OpenPOWER on IntegriCloud