summaryrefslogtreecommitdiffstats
path: root/src/import/hwpf/fapi2/include/variable_buffer.H
Commit message (Collapse)AuthorAgeFilesLines
* Fix "possibly uninitialized variable"Zach Clark2019-06-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | Compiling with GCOV causes the variable_buffer::flipBit() function to be analyzed differently than without, resulting in a warning for the possibly-uninitialized variable and causing compilation failure when the -Werror option is enabled. This commit explicitly initializes the variable. Change-Id: Idc59ba411cc1f9200888bba6c215e48bb7051b7c Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/78485 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> 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> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: Ilya Smirnov <ismirno@us.ibm.com> Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/78513 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
* Enable and fix error log variable_buffer support.Donald Washburn2017-06-151-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41548 Reviewed-by: Hostboot Team <hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
* Variable buffer api additionsRichard J. Knight2016-08-121-12/+44
| | | | | | | | | | | | | | | | | | | -Added flipBit() and getNumBitsSet() support to fapi2::variable_buffer Change-Id: Ifb0be59520dc6cfa26a060e7981ff27f1e0b4b68 RTC:126566 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27943 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: LUCAS W. MULKEY <lwmulkey@us.ibm.com> Reviewed-by: Brian R. Silver <bsilver@us.ibm.com> Reviewed-by: Matt K. Light <mklight@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27951 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
* Update prologs of mirrored files to apache licenseStephen Cprek2016-08-051-8/+14
| | | | | | | | Change-Id: I25a782f6f8af801beb35f541f6076c482b78bf8e Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27920 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
* variable_buffer: Support get<OT>() / put<OT>() for incomplete buffer tailsJoachim Fenkes2016-07-211-6/+31
| | | | | | | | | | | | | | | | | | | | Support getting and putting the last incomplete OT in a buffer that's not an integer multiple of the OT's size. Values will be treated left-aligned. Also add an assertion to get<OT>() to make sure we don't read beyond the end of the buffer. Change-Id: I527d21209c1694598526bfc815bfd7de38d0fb10 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26048 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: Thi N. Tran <thi@us.ibm.com> Reviewed-by: Brian R. Silver <bsilver@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26054 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
* Variable buffer issues when inserting OT variable bufferRichard J. Knight2016-06-221-4/+8
| | | | | | | | | | | | | | | | | | | -Added check for integral_type for OT insert. This change forces the user to insert only integral types using the generic insert interface. Change-Id: Ic207f855afff5e80d6bb342f94873964a0f60d16 RTC:151788 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25861 Tested-by: Jenkins Server Tested-by: PPE CI Reviewed-by: Soma Bhanutej <soma.bhanu@in.ibm.com> Reviewed-by: Joachim Fenkes <fenkes@de.ibm.com> Tested-by: Hostboot CI Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25869 Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
* Variable buffer problemsRichard J. Knight2016-06-011-16/+5
| | | | | | | | | | | | | | Change-Id: I19eba345844ff3344939f77ec7e7fe8183e1b9a5 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24725 Tested-by: Jenkins Server Reviewed-by: Matt K. Light <mklight@us.ibm.com> Tested-by: PPE CI Tested-by: Hostboot CI Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24729 Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
* Fix assert() in variable_bufferRichard J. Knight2016-05-181-3/+7
| | | | | | | | | | | | | | | | | -Updated code to use fapi2::Assert instead of assert() Change-Id: I5184f1f41c7b0568fac8d98e6b38d4de1b76269f RTC:128525 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24261 Tested-by: Jenkins Server Reviewed-by: Matt K. Light <mklight@us.ibm.com> Tested-by: PPE CI Tested-by: Hostboot CI Reviewed-by: Brian R. Silver <bsilver@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24264 Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
* variable_buffer uninitialized errorRichard J. Knight2016-02-221-2/+2
| | | | | | | | | | | | | | -Update code to initialize the variable where its declared. Change-Id: I037b31ebf1b4f08f734ab65a45e1bc70ca016fc9 RTC:144425 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/23240 Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: Brian Silver <bsilver@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/24520 Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
* Remove use of initializer list from variable buffer.Richard J. Knight2015-12-111-2/+2
| | | | | | | | Change-Id: Ida5cf7c4505501b84c02f657910e5d4883ddc673 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/22633 Reviewed-by: Brian Silver <bsilver@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* fapi2 doxygen warning/error cleanup from ecmd repositoryKahn Evans2015-12-111-7/+7
| | | | | | | | | Change-Id: I502a6f79f461632588b46e51d5892e2d6b74942d Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/20985 Tested-by: Jenkins Server Reviewed-by: Matt K. Light <mklight@us.ibm.com> Reviewed-by: Brian Silver <bsilver@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
* set default length of bits to clear to oneMatt K. Light2015-12-111-1/+1
| | | | | | | | | Change-Id: I156e8dbaf28058672c99d208881b74ea267b440d Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/20369 Tested-by: Jenkins Server Reviewed-by: Brian Silver <bsilver@us.ibm.com> Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
* Fixed overflow problem in buffersBrian Silver2015-12-111-506/+539
| | | | | | | | | Change-Id: Idb3349052373cedaa8955b530a00dd7a25e72122 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/20182 Tested-by: Jenkins Server Reviewed-by: Matt K. Light <mklight@us.ibm.com> Reviewed-by: WILLIAM G. HOFFA <wghoffa@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
* Add variable_buffer get<OT>()Brian Silver2015-12-111-2/+19
| | | | | | | | | Change-Id: Iaf658f2d4a43703400ea016c37244f27524a73c0 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/17679 Tested-by: Jenkins Server Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: Matt K. Light <mklight@us.ibm.com> Reviewed-by: Brian Silver <bsilver@us.ibm.com>
* Add variable_buffer shiftLeft(), shiftRight()Brian Silver2015-12-111-6/+129
| | | | | | | | | Change-Id: I29692c971987f8fdf71b31d1200718c097085ede Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/17676 Tested-by: Jenkins Server Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: PRACHI GUPTA <pragupta@us.ibm.com> Reviewed-by: Brian Silver <bsilver@us.ibm.com>
* Add support for variable_buffer setBit/clearBitRichard Knight2015-12-111-15/+68
| | | | | | | | | Change-Id: Ia45b4163af6a893faa9a3f63b368c693e52b6181 RTC:126648 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/17547 Tested-by: Jenkins Server Reviewed-by: Matt K. Light <mklight@us.ibm.com> Reviewed-by: Brian Silver <bsilver@us.ibm.com>
* Add support for isBitClear() to variable_bufferRichard Knight2015-12-111-13/+15
| | | | | | | | | Change-Id: I1afae3f571868bd28829fe1b44b3a73f6f07c951 RTC:126650 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/17357 Tested-by: Jenkins Server Reviewed-by: Matt K. Light <mklight@us.ibm.com> Reviewed-by: Brian Silver <bsilver@us.ibm.com>
* Add isBitSet() supportRichard Knight2015-12-111-12/+67
| | | | | | | | | | Change-Id: Idaadf5bc868e87096642a96fd37215909b425fb2 RTC:126649 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16982 Tested-by: Jenkins Server Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: Matt K. Light <mklight@us.ibm.com> Reviewed-by: Brian Silver <bsilver@us.ibm.com>
* Update FFDC mechanism to better handle targets, buffersBrian Silver2015-12-111-21/+21
| | | | | | | | | | | Fix bug in --empty-ffdc-classes, exectue() Change-Id: I2a872efacbe68719495b7d40123db683c3a6db3e Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/17340 Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: Matt K. Light <mklight@us.ibm.com> Reviewed-by: Brian Silver <bsilver@us.ibm.com> Tested-by: Brian Silver <bsilver@us.ibm.com>
* Remove buffer_base.HBrian Silver2015-12-111-294/+303
| | | | | | | | | Change-Id: Iaa194fa4261a122dd0516e85572ae6deacbe854c Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/17135 Reviewed-by: STEPHEN M. CPREK <smcprek@us.ibm.com> Reviewed-by: Matt K. Light <mklight@us.ibm.com> Reviewed-by: Brian Silver <bsilver@us.ibm.com> Tested-by: Brian Silver <bsilver@us.ibm.com>
* Make variable_buffer::set() overflow checking more preciseBrian Silver2015-12-111-0/+25
| | | | | | | | | | | Fix toString() argument documentation Change-Id: I321e59a89d52d8d1681515b76c796027d127078b Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16848 Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: PRACHI GUPTA <pragupta@us.ibm.com> Reviewed-by: Brian Silver <bsilver@us.ibm.com> Tested-by: Brian Silver <bsilver@us.ibm.com>
* Add variable_buffer::pointer()Brian Silver2015-12-111-0/+6
| | | | | | | | | | Change-Id: I4018509b00898c6ce9706c62d2d956a1019126aa Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16819 Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: PRACHI GUPTA <pragupta@us.ibm.com> Reviewed-by: STEPHEN M. CPREK <smcprek@us.ibm.com> Reviewed-by: Brian Silver <bsilver@us.ibm.com> Tested-by: Brian Silver <bsilver@us.ibm.com>
* Fix flush, invert, and reverse buffer chainingBrian Silver2015-12-111-0/+21
| | | | | | | | | | | | | | Fix flush, insert/extract invert, and reverse buffer chaining Add thread bitset functions Remove putScom reference - allow for (b | 0x6) as a buffer param Add FAPI@_RC_FALSE to allow for tri-bool type operations Change-Id: I5e07f3f2050e45bca1a6c5a21c74ac62f5b9c51d Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16539 Reviewed-by: Matt K. Light <mklight@us.ibm.com> Reviewed-by: James N. Klazynski <jklazyns@us.ibm.com> Reviewed-by: Brian Silver <bsilver@us.ibm.com> Tested-by: Brian Silver <bsilver@us.ibm.com>
* Buffer, targeting updatesBrian Silver2015-12-111-46/+270
| | | | | | | | | | | | | | | | Update target types for ex, l2/l3 Add variable_buffer resize Update, fix, variable_buffer insert/extract variable_buffer array constructor -Wall clean up Refactor buffer::insert, bit_lengths Change-Id: I2bbec294f275a80c33917dc2df2f8b8220f6d8d6 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16359 Reviewed-by: Matt K. Light <mklight@us.ibm.com> Reviewed-by: MATTHEW A. PLOETZ <maploetz@us.ibm.com> Reviewed-by: Brian Silver <bsilver@us.ibm.com> Tested-by: Brian Silver <bsilver@us.ibm.com>
* Add doxygen fapi2 tooling, doc clean upBrian Silver2015-12-111-5/+5
| | | | | | | Change-Id: Ieb787904e7d359f966298cf834195bed5ce86207 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15730 Reviewed-by: Brian Silver <bsilver@us.ibm.com> Tested-by: Brian Silver <bsilver@us.ibm.com>
* Error/xml parsing and FFDC classesBrian Silver2015-12-111-0/+663
Change-Id: Iddc92bb876dd07efe398255d7321ac6394eb4ae9 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15966 Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: Matt K. Light <mklight@us.ibm.com> Reviewed-by: Brian Silver <bsilver@us.ibm.com> Tested-by: Brian Silver <bsilver@us.ibm.com>
OpenPOWER on IntegriCloud