blob: e31ca03e4b2a317a7ec6b71867eba4db87922a84 [file] [log] [blame]
Masahiro Yamada574388c2016-09-03 11:37:40 +09001/*
Ambroise Vincentd207f562019-04-10 12:50:27 +01002 * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
Masahiro Yamada574388c2016-09-03 11:37:40 +09003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Antonio Nino Diaze0f90632018-12-14 00:18:21 +00007#include <plat/common/platform.h>
Masahiro Yamada574388c2016-09-03 11:37:40 +09008
Masahiro Yamada9679c9c2017-06-14 20:38:12 +09009extern char uniphier_rotpk_hash[], uniphier_rotpk_hash_end[];
10
Masahiro Yamada574388c2016-09-03 11:37:40 +090011int plat_get_rotpk_info(void *cookie, void **key_ptr, unsigned int *key_len,
12 unsigned int *flags)
13{
Masahiro Yamada9679c9c2017-06-14 20:38:12 +090014 *key_ptr = uniphier_rotpk_hash;
15 *key_len = uniphier_rotpk_hash_end - uniphier_rotpk_hash;
16 *flags = ROTPK_IS_HASH;
Masahiro Yamada574388c2016-09-03 11:37:40 +090017
18 return 0;
19}
20
21int plat_get_nv_ctr(void *cookie, unsigned int *nv_ctr)
22{
23 /*
24 * No support for non-volatile counter. Update the ROT key to protect
25 * the system against rollback.
26 */
27 *nv_ctr = 0;
28
29 return 0;
30}
31
32int plat_set_nv_ctr(void *cookie, unsigned int nv_ctr)
33{
34 return 0;
35}
Ambroise Vincentd207f562019-04-10 12:50:27 +010036
37int plat_get_mbedtls_heap(void **heap_addr, size_t *heap_size)
38{
39 return get_mbedtls_heap_helper(heap_addr, heap_size);
40}