1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright (c) 2021, EPAM Systems
4  */
5 
6 #ifndef __ROMAPI_H
7 #define __ROMAPI_H
8 
9 #include <compiler.h>
10 
11 /*
12  * Mask ROM provides number of facilities, including function that returns 32
13  * byte random vector.
14  */
15 #define PLAT_RND_VECTOR_SZ	32
16 
17 /*
18  * Call to this function must be protected by a spinlock, because ROM code
19  * accesses hardware. This function requires at least 4kb scratch buffer to
20  * work. All parameters should be aligned to 8 bytes.
21  */
22 uint32_t plat_rom_getrndvector(uint8_t rndbuff[PLAT_RND_VECTOR_SZ],
23 			       uint8_t *scratch,
24 			       uint32_t scratch_sz);
25 
26 #endif
27