diff options
| author | Jaymes Wilks <mjwilks@us.ibm.com> | 2017-06-29 16:26:06 -0500 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-07-19 14:18:31 -0400 |
| commit | 80631edd1d39c7bc5d0081f8ce0b792903d1955d (patch) | |
| tree | 012f705cd9f2a7898534d075acd9f39d8935dec3 /src/include/usr/targeting/common | |
| parent | 48a8ff9008c000ce8b50708448a74f259c01d9d6 (diff) | |
| download | talos-hostboot-80631edd1d39c7bc5d0081f8ce0b792903d1955d.tar.gz talos-hostboot-80631edd1d39c7bc5d0081f8ce0b792903d1955d.zip | |
Generate range check code for persistent read/write attributes
This change to xmltobh.pl adds support for a new range tag in
attribute_types.xml and generates range checking code when the
new range tag is present for an attribute.
Change-Id: Ib602b80e18d717fccd9cb8512f004c73be891bda
RTC:163084
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42625
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Stephen M. Cprek <smcprek@us.ibm.com>
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: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr/targeting/common')
| -rw-r--r-- | src/include/usr/targeting/common/target.H | 19 | ||||
| -rw-r--r-- | src/include/usr/targeting/common/targreasoncodes.H | 2 |
2 files changed, 20 insertions, 1 deletions
diff --git a/src/include/usr/targeting/common/target.H b/src/include/usr/targeting/common/target.H index bbbfe089d..0681da27f 100644 --- a/src/include/usr/targeting/common/target.H +++ b/src/include/usr/targeting/common/target.H @@ -762,7 +762,7 @@ void setFrequencyAttributes(Target * i_sys, * and halts the IPL. * * @param[in] i_pTarget The target associated with the attribute that failed - * enum value checking. + * enum value checking. Cannot be nullptr. * @param[in] i_attr The attribute id of the attribute that failed enum * value checking. * @param[in] i_invalidValue The invalid value that failed the enum check. @@ -771,6 +771,23 @@ void handleEnumCheckFailure(const Target* i_pTarget, const ATTRIBUTE_ID i_attr, const uint64_t i_invalidValue); +// Function to handle secureboot attribute range check failures +/** + * @brief Creates an error log with target and attribute information + * and halts the IPL. + * + * @param[in] i_pTarget The target associated with the attribute that failed. + * Cannot be nullptr. + * + * @param[in] i_attr The attribute id of the attribute that failed + * + * @param[in] i_outOfRangeValue The value that was out of range + */ +void handleRangeCheckFailure(const Target* i_pTarget, + const ATTRIBUTE_ID i_attr, + const uint64_t i_outOfRangeValue); + + // The following #include ensures that persistent read/write attributes are // value-checked for validity upon calling getAttr. This is done via // autogenerated template specializations for each attribute. External calls diff --git a/src/include/usr/targeting/common/targreasoncodes.H b/src/include/usr/targeting/common/targreasoncodes.H index 18d7c6726..92d9611c4 100644 --- a/src/include/usr/targeting/common/targreasoncodes.H +++ b/src/include/usr/targeting/common/targreasoncodes.H @@ -49,6 +49,7 @@ enum TargetingModuleId TARG_CREATE_VMM_SECTIONS = 0x09, TARG_APPLY_ATTR_OVER = 0x0A, TARG_HANDLE_ENUM_CHECK_FAILURE = 0x0B, + TARG_HANDLE_RANGE_CHECK_FAILURE = 0x0C, }; enum TargetingReasonCode @@ -75,6 +76,7 @@ enum TargetingReasonCode TARG_RC_APPLY_ATTR_OVER_NOT_ALLOWED = TARG_COMP_ID | 0x14, TARG_RC_MM_BLOCK_UNMAP_FAIL = TARG_COMP_ID | 0x15, TARG_RC_ATTRIBUTE_ENUM_CHECK_FAIL = TARG_COMP_ID | 0x16, + TARG_RC_ATTRIBUTE_RANGE_CHECK_FAIL = TARG_COMP_ID | 0x17, }; }; // End TARGETING namespace |

