diff options
author | Penny Chiu <pchiu@nvidia.com> | 2012-12-21 21:17:37 +0800 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2013-01-11 08:36:49 -0800 |
commit | 5f4e2a3a2e2d4424053d8c4479323284d3b8dbf6 (patch) | |
tree | af75a98665657e3f30c86b61cc692c075485e6da /crypto.c | |
parent | ce21ef893f0a0b321c2e0a99ff8a1641d6c40625 (diff) | |
download | nvidia-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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); |