Skip to content

Commit

Permalink
Secure Boot: Make crypto algorithms dispatching work across tool chains
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nick Bofferding authored and ploetzma committed Jul 19, 2017
1 parent 80631ed commit 8032d64
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions src/securerom/secureromasm.S
Expand Up @@ -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:
Expand Down

0 comments on commit 8032d64

Please sign in to comment.