From 8032d6423f22af3ff23e5a1c9d736ec9bbc67c8d Mon Sep 17 00:00:00 2001 From: Nick Bofferding Date: Tue, 18 Jul 2017 10:46:19 -0500 Subject: Secure Boot: Make crypto algorithms dispatching work across tool chains RTC: 174017 Change-Id: I0a5295d361f77440a9d605b7c9fff74388cb8ca3 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43290 Reviewed-by: Marshall J. Wilks Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Stephen M. Cprek Reviewed-by: Michael Baiocchi Reviewed-by: Matthew A. Ploetz --- src/securerom/secureromasm.S | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'src/securerom') diff --git a/src/securerom/secureromasm.S b/src/securerom/secureromasm.S index 83dd42358..62b410639 100644 --- a/src/securerom/secureromasm.S +++ b/src/securerom/secureromasm.S @@ -90,28 +90,43 @@ _ROM_verify: # the parameters in the Hostboot C code, we have these helper functions to # provide springboard with the offest to subtract to find the base secureROM # address. + +# NOTE: Originally each of the following helper functions was formatted to +# subtract the starting offset of the calling assembly from r10 like the +# following example: +# li r10, -_SHA512_Init +# b springboard +# However, some tool chain versions do not correctly support this convention, so +# instead put the non-negative offset into r10 and then negate it + remove_sha512_init_offset: - li r10, -_SHA512_Init + li r10, _SHA512_Init + neg r10,r10 b springboard remove_sha512_update_offset: - li r10, -_SHA512_Update + li r10, _SHA512_Update + neg r10,r10 b springboard remove_sha512_final_offset: - li r10, -_SHA512_Final + li r10, _SHA512_Final + neg r10,r10 b springboard remove_sha512_hash_offset: - li r10, -_SHA512_Hash + li r10, _SHA512_Hash + neg r10,r10 b springboard remove_ec_verify_offset: - li r10, -_ec_verify + li r10, _ec_verify + neg r10,r10 b springboard remove_rom_verify_offset: - li r10, -_ROM_verify + li r10, _ROM_verify + neg r10,r10 b springboard springboard: -- cgit v1.2.1