summaryrefslogtreecommitdiff
path: root/crypto.c
diff options
context:
space:
mode:
authorPenny Chiu <pchiu@nvidia.com>2012-12-21 21:17:37 +0800
committerStephen Warren <swarren@nvidia.com>2013-01-11 08:36:49 -0800
commit5f4e2a3a2e2d4424053d8c4479323284d3b8dbf6 (patch)
treeaf75a98665657e3f30c86b61cc692c075485e6da /crypto.c
parentce21ef893f0a0b321c2e0a99ff8a1641d6c40625 (diff)
downloadnvidia-cbootimage-5f4e2a3a2e2d4424053d8c4479323284d3b8dbf6.tar.gz
Rewrite the interface for T20/T30 bct data access
Create a structure called cbootimage_soc_config that defines a chip, and data tables and functions for that chip. The main function just sets appropriate instance based on boot_data_version, then uses the same interface to access different chip bct data. Change-Id: I58fbc07012dce8947467c0bea62e2a50126d54fe Signed-off-by: Penny Chiu <pchiu@nvidia.com> Reviewed-on: http://git-master/r/173670 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Rhyland Klein <rklein@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'crypto.c')
-rw-r--r--crypto.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto.c b/crypto.c
index 7e49c00..88de357 100644
--- a/crypto.c
+++ b/crypto.c
@@ -267,15 +267,15 @@ sign_bct(build_image_context *context,
assert(bct != NULL);
- if (g_bct_parse_interf->get_value(token_hash_size,
+ if (g_soc_config->get_value(token_hash_size,
&hash_size,
bct) != 0)
return -ENODATA;
- if (g_bct_parse_interf->get_value(token_crypto_offset,
+ if (g_soc_config->get_value(token_crypto_offset,
&Offset,
bct) != 0)
return -ENODATA;
- if (g_bct_parse_interf->get_value(token_crypto_length,
+ if (g_soc_config->get_value(token_crypto_length,
&length,
bct) != 0)
return -ENODATA;
@@ -286,7 +286,7 @@ sign_bct(build_image_context *context,
e = sign_data_block(bct + Offset, length, hash_buffer);
if (e != 0)
goto fail;
- e = g_bct_parse_interf->set_data(token_crypto_hash,
+ e = g_soc_config->set_data(token_crypto_hash,
hash_buffer,
hash_size,
bct);