rpi3_trusted_boot.c 724 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) 2017-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 rpi3_rotpk_hash[], rpi3_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 = rpi3_rotpk_hash;
  12. *key_len = rpi3_rotpk_hash_end - rpi3_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. }