hikey_tbbr.c 729 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <plat/common/platform.h>
  7. extern char hikey_rotpk_hash[], hikey_rotpk_hash_end[];
  8. int plat_get_rotpk_info(void *cookie, void **key_ptr, unsigned int *key_len,
  9. unsigned int *flags)
  10. {
  11. *key_ptr = hikey_rotpk_hash;
  12. *key_len = hikey_rotpk_hash_end - hikey_rotpk_hash;
  13. *flags = ROTPK_IS_HASH;
  14. return 0;
  15. }
  16. int plat_get_nv_ctr(void *cookie, unsigned int *nv_ctr)
  17. {
  18. *nv_ctr = 0;
  19. return 0;
  20. }
  21. int plat_set_nv_ctr(void *cookie, unsigned int nv_ctr)
  22. {
  23. return 1;
  24. }
  25. int plat_get_mbedtls_heap(void **heap_addr, size_t *heap_size)
  26. {
  27. return get_mbedtls_heap_helper(heap_addr, heap_size);
  28. }