diff options
| author | Jaymes Wilks <mjwilks@us.ibm.com> | 2017-08-25 14:18:38 -0500 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-08-31 12:49:40 -0400 |
| commit | e1678bffbd5cba43911f7e6f670ac3c3bb68af39 (patch) | |
| tree | 2f9086aa3a1e29bbc353591c4a3d771c92472d0d /src/include/usr/fapi2 | |
| parent | 45d359f3df82a3e9edf31b89193c7a61c5229977 (diff) | |
| download | talos-hostboot-e1678bffbd5cba43911f7e6f670ac3c3bb68af39.tar.gz talos-hostboot-e1678bffbd5cba43911f7e6f670ac3c3bb68af39.zip | |
Replace HB_SECURITY_MODE attribute with SECUREBOOT API equivalent
The HB_SECURITY_MODE attribute will now be a variable managed by
secureboot. The FAPI attribue SECURITY_MODE that maps to the HB
version will now call to that variable in the SECUREBOOT API.
Change-Id: I7e42c3f2e355feeb0d49aa6a998960bc5409bfa2
RTC:178643
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45167
Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@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>
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/fapi2')
| -rw-r--r-- | src/include/usr/fapi2/attribute_service.H | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/include/usr/fapi2/attribute_service.H b/src/include/usr/fapi2/attribute_service.H index a6e793914..f21020610 100644 --- a/src/include/usr/fapi2/attribute_service.H +++ b/src/include/usr/fapi2/attribute_service.H @@ -276,6 +276,25 @@ ReturnCode fapiAttrGetBadDqBitmap( const Target<TARGET_TYPE_ALL>& i_fapiTarget, ReturnCode fapiAttrSetBadDqBitmap( const Target<TARGET_TYPE_ALL>& i_fapiTarget, ATTR_BAD_DQ_BITMAP_Type (&i_data) ); +/// @brief This function is called by the FAPI_ATTR_GET macro when getting +/// the SECURITY_MODE attribute. It should not be called directly. +/// +/// @param[out] o_securityMode Provides the attribute contents to the caller +/// @return ReturnCode Always FAPI2_RC_SUCCESS, this cannot fail. +/// If a toplevel target cannot be found then +/// an assert triggers in the platform call +/// +ReturnCode platGetSecurityMode(uint8_t & o_securityMode); + +/// @brief This function is called by the FAPI_ATTR_SET macro when setting +/// the SECURITY_MODE attribute. It should not be called directly. There are no +/// parameters. This is intentional as setting this attribute is not supported +/// from FAPI or FAPI runtime code. A FAPI INFO trace will be printed explaining +/// this. +/// +/// @return ReturnCode Always FAPI2_RC_SUCCESS, this cannot fail. +ReturnCode platSetSecurityMode(); + // ----------------------------------------------------------------------------- // End TODO: End to be supported functions // ----------------------------------------------------------------------------- @@ -381,4 +400,16 @@ fapiToTargeting::ID, sizeof(VAL), &(VAL)) ? fapi2::ReturnCode() : \ fapi2::platAttrSvc::fapiAttrSetBadDqBitmap(TARGET, VAL) +//------------------------------------------------------------------------------ +// MACRO to route ATTR_SECURITY_MODE access to the correct HB function +//------------------------------------------------------------------------------ +#define ATTR_SECURITY_MODE_GETMACRO(ID, TARGET, VAL) \ + AttrOverrideSync::getAttrOverrideFunc(ID, TARGET, &VAL)\ + ? fapi2::ReturnCode() : \ + fapi2::platAttrSvc::platGetSecurityMode(VAL) +#define ATTR_SECURITY_MODE_SETMACRO(ID, TARGET, VAL) \ + AttrOverrideSync::getAttrOverrideFunc(ID, TARGET, &VAL)\ + ? fapi2::ReturnCode() : \ + fapi2::platAttrSvc::platSetSecurityMode() + #endif // ATTRIBUTESERVICE_H_ |

