diff options
author | Nick Bofferding <bofferdn@us.ibm.com> | 2017-04-22 17:15:03 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-05-08 14:12:48 -0400 |
commit | 8527fc2b9549b9b6782fdffde29ff8713e677bc4 (patch) | |
tree | eb277c60fcf28eec2116546c2ce4be6ca4a53144 /src/include/usr/pnor/pnorif.H | |
parent | b93bb1c4e5151e309231a6b667bc98deaf98572f (diff) | |
download | talos-hostboot-8527fc2b9549b9b6782fdffde29ff8713e677bc4.tar.gz talos-hostboot-8527fc2b9549b9b6782fdffde29ff8713e677bc4.zip |
Support gracefully adding signing headers to PNOR sections
Change-Id: Ie8ce7672a41c0b6230918911f59ada5443c552f5
RTC: 170650
CMVC-Coreq: 1022416
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39869
Reviewed-by: Stephen M. Cprek <smcprek@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Michael Baiocchi <mbaiocch@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>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr/pnor/pnorif.H')
-rw-r--r-- | src/include/usr/pnor/pnorif.H | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/include/usr/pnor/pnorif.H b/src/include/usr/pnor/pnorif.H index e4c61c72e..3a2d3e53b 100644 --- a/src/include/usr/pnor/pnorif.H +++ b/src/include/usr/pnor/pnorif.H @@ -221,6 +221,48 @@ const char * SectionIdToString( uint32_t i_secIdIndex ); */ bool cmpSecurebootMagicNumber(const uint8_t* i_vaddr); +// @TODO RTC 173489 +// Remove API once FSP fully supports signing of PNOR sections that did not +// previously have a sha512 header +/** + * @brief Determines whether requested PNOR section has a recognized header + * + * @param[in] i_secId ID of requested section + * @param[in] i_TOC TOC entry for requested section + * @param[out] o_knownHeader Whether header was recognized or not + * + * @return errlHndl_t Error log handle + * @retval nullptr Success! Output parameter valid + * @retval !nullptr Error log pointer; output parameter invalid + */ +errlHndl_t hasKnownHeader( + PNOR::SectionId i_secId, + const PNOR::SectionData_t& i_TOC, + bool& o_knownHeader); + +// @TODO RTC 173489 +// Remove API once FSP fully supports signing of PNOR sections that did not +// previously have a sha512 header +/** + * @brief Read first few bytes of requested section's "potential" header + * + * @param[in] i_secId ID of requested section + * @param[in] i_TOC TOC entry for requested section + * @param[in] i_size Number of bytes to read from the beginning of the + * requested section + * @param[in] o_pData Pointer to a buffer of at least "i_size" bytes to + * hold the returned data. Asserts if nullptr + * + * @return errlHndl_t Error log handle + * @retval nullptr Success! Requested bytes read to output buffer + * @retval !nullptr Error log pointer; output buffer invalid + */ +errlHndl_t readHeaderMagic( + PNOR::SectionId i_secId, + const PNOR::SectionData_t& i_TOC, + size_t i_size, + void* o_pData); + } // PNOR #endif |