summaryrefslogtreecommitdiffstats
path: root/src/securerom/secureromasm.S
diff options
context:
space:
mode:
authorNick Bofferding <bofferdn@us.ibm.com>2017-07-18 10:46:19 -0500
committerMatthew A. Ploetz <maploetz@us.ibm.com>2017-07-19 17:51:16 -0400
commit8032d6423f22af3ff23e5a1c9d736ec9bbc67c8d (patch)
treefda87f031cb69b36f309ea0306fb13d73bc8efae /src/securerom/secureromasm.S
parent80631edd1d39c7bc5d0081f8ce0b792903d1955d (diff)
downloadtalos-hostboot-8032d6423f22af3ff23e5a1c9d736ec9bbc67c8d.tar.gz
talos-hostboot-8032d6423f22af3ff23e5a1c9d736ec9bbc67c8d.zip
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 <mjwilks@us.ibm.com> Tested-by: Jenkins Server <pfd-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> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Stephen M. Cprek <smcprek@us.ibm.com> Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com>
Diffstat (limited to 'src/securerom/secureromasm.S')
-rw-r--r--src/securerom/secureromasm.S27
1 files changed, 21 insertions, 6 deletions
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:
OpenPOWER on IntegriCloud