xref: /rk3399_ARM-atf/plat/rpi/common/rpi3_trusted_boot.c (revision 4f2b984852556afc3543d90150c46be4aaadbc75)
1*4f2b9848SAndre Przywara /*
2*4f2b9848SAndre Przywara  * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
3*4f2b9848SAndre Przywara  *
4*4f2b9848SAndre Przywara  * SPDX-License-Identifier: BSD-3-Clause
5*4f2b9848SAndre Przywara  */
6*4f2b9848SAndre Przywara 
7*4f2b9848SAndre Przywara #include <plat/common/platform.h>
8*4f2b9848SAndre Przywara 
9*4f2b9848SAndre Przywara extern char rpi3_rotpk_hash[], rpi3_rotpk_hash_end[];
10*4f2b9848SAndre Przywara 
11*4f2b9848SAndre Przywara int plat_get_rotpk_info(void *cookie, void **key_ptr, unsigned int *key_len,
12*4f2b9848SAndre Przywara 			unsigned int *flags)
13*4f2b9848SAndre Przywara {
14*4f2b9848SAndre Przywara 	*key_ptr = rpi3_rotpk_hash;
15*4f2b9848SAndre Przywara 	*key_len = rpi3_rotpk_hash_end - rpi3_rotpk_hash;
16*4f2b9848SAndre Przywara 	*flags = ROTPK_IS_HASH;
17*4f2b9848SAndre Przywara 
18*4f2b9848SAndre Przywara 	return 0;
19*4f2b9848SAndre Przywara }
20*4f2b9848SAndre Przywara 
21*4f2b9848SAndre Przywara int plat_get_nv_ctr(void *cookie, unsigned int *nv_ctr)
22*4f2b9848SAndre Przywara {
23*4f2b9848SAndre Przywara 	*nv_ctr = 0;
24*4f2b9848SAndre Przywara 
25*4f2b9848SAndre Przywara 	return 0;
26*4f2b9848SAndre Przywara }
27*4f2b9848SAndre Przywara 
28*4f2b9848SAndre Przywara int plat_set_nv_ctr(void *cookie, unsigned int nv_ctr)
29*4f2b9848SAndre Przywara {
30*4f2b9848SAndre Przywara 	return 1;
31*4f2b9848SAndre Przywara }
32*4f2b9848SAndre Przywara 
33*4f2b9848SAndre Przywara int plat_get_mbedtls_heap(void **heap_addr, size_t *heap_size)
34*4f2b9848SAndre Przywara {
35*4f2b9848SAndre Przywara 	return get_mbedtls_heap_helper(heap_addr, heap_size);
36*4f2b9848SAndre Przywara }
37