1*54fd6939SJiyong Park /*
2*54fd6939SJiyong Park * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
3*54fd6939SJiyong Park *
4*54fd6939SJiyong Park * SPDX-License-Identifier: BSD-3-Clause
5*54fd6939SJiyong Park */
6*54fd6939SJiyong Park
7*54fd6939SJiyong Park #include <plat/common/platform.h>
8*54fd6939SJiyong Park
9*54fd6939SJiyong Park extern char uniphier_rotpk_hash[], uniphier_rotpk_hash_end[];
10*54fd6939SJiyong Park
plat_get_rotpk_info(void * cookie,void ** key_ptr,unsigned int * key_len,unsigned int * flags)11*54fd6939SJiyong Park int plat_get_rotpk_info(void *cookie, void **key_ptr, unsigned int *key_len,
12*54fd6939SJiyong Park unsigned int *flags)
13*54fd6939SJiyong Park {
14*54fd6939SJiyong Park *key_ptr = uniphier_rotpk_hash;
15*54fd6939SJiyong Park *key_len = uniphier_rotpk_hash_end - uniphier_rotpk_hash;
16*54fd6939SJiyong Park *flags = ROTPK_IS_HASH;
17*54fd6939SJiyong Park
18*54fd6939SJiyong Park return 0;
19*54fd6939SJiyong Park }
20*54fd6939SJiyong Park
plat_get_nv_ctr(void * cookie,unsigned int * nv_ctr)21*54fd6939SJiyong Park int plat_get_nv_ctr(void *cookie, unsigned int *nv_ctr)
22*54fd6939SJiyong Park {
23*54fd6939SJiyong Park /*
24*54fd6939SJiyong Park * No support for non-volatile counter. Update the ROT key to protect
25*54fd6939SJiyong Park * the system against rollback.
26*54fd6939SJiyong Park */
27*54fd6939SJiyong Park *nv_ctr = 0;
28*54fd6939SJiyong Park
29*54fd6939SJiyong Park return 0;
30*54fd6939SJiyong Park }
31*54fd6939SJiyong Park
plat_set_nv_ctr(void * cookie,unsigned int nv_ctr)32*54fd6939SJiyong Park int plat_set_nv_ctr(void *cookie, unsigned int nv_ctr)
33*54fd6939SJiyong Park {
34*54fd6939SJiyong Park return 0;
35*54fd6939SJiyong Park }
36*54fd6939SJiyong Park
plat_get_mbedtls_heap(void ** heap_addr,size_t * heap_size)37*54fd6939SJiyong Park int plat_get_mbedtls_heap(void **heap_addr, size_t *heap_size)
38*54fd6939SJiyong Park {
39*54fd6939SJiyong Park return get_mbedtls_heap_helper(heap_addr, heap_size);
40*54fd6939SJiyong Park }
41