1 /*
2  * Copyright (c) 2015-2017, Renesas Electronics Corporation. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef ROM_API_H
8 #define ROM_API_H
9 
10 #include <stdint.h>
11 
12 #define SBROM_OK				(0x00000000U)
13 #define SBROM_ILLEGAL_INPUT_PARAM_ERR		(0x0B000001U)
14 #define SBROM_ILLEGAL_OEM_HASH_VALUE_ERR	(0x0B000008U)
15 #define SBROM_ILLEGAL_LCS_FOR_OPERATION_ERR	(0x0B000010U)
16 #define SBROM_HASH_NOT_PROGRAMMED_ERR		(0x0B000100U)
17 #define SBROM_PUB_KEY_HASH_VALIDATION_FAILURE	(0xF1000006U)
18 #define SBROM_RSA_SIG_VERIFICATION_FAILED	(0xF1000007U)
19 
20 #define LCS_CM					(0x0U)
21 #define LCS_DM					(0x1U)
22 #define LCS_SD					(0x3U)
23 #define LCS_SE					(0x5U)
24 #define LCS_FA					(0x7U)
25 
26 typedef uint32_t(*rom_read_flash_f) (uint64_t src, uint8_t *dst, uint32_t len);
27 uint32_t rcar_rom_secure_boot_api(uint32_t *key, uint32_t *cert,
28 				  rom_read_flash_f f);
29 uint32_t rcar_rom_get_lcs(uint32_t *lcs);
30 
31 #endif /* ROM_API_H */
32