blob: e9fa18c0ef2989360fc0fa736eb264fb0d6400f2 [file] [log] [blame]
Jassi Brar554f1722022-03-03 15:24:31 -06001/*
2 * Copyright (c) 2022, Socionext Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <plat/common/platform.h>
8
9extern char sq_rotpk_hash[], sq_rotpk_hash_end[];
10
11int plat_get_rotpk_info(void *cookie, void **key_ptr, unsigned int *key_len,
12 unsigned int *flags)
13{
14 *key_ptr = sq_rotpk_hash;
15 *key_len = sq_rotpk_hash_end - sq_rotpk_hash;
16 *flags = ROTPK_IS_HASH;
17
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}
36
37int plat_get_mbedtls_heap(void **heap_addr, size_t *heap_size)
38{
39 return get_mbedtls_heap_helper(heap_addr, heap_size);
40}