blob: 4b1008032ef3ae31be14f8f0cadffb22fd2f170d [file] [log] [blame]
Jorge Ramirez-Ortiz83b9d1a2018-09-23 09:41:21 +02001/*
2 * Copyright (c) 2015-2017, Renesas Electronics Corporation. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +00007#ifndef ROM_API_H
8#define ROM_API_H
Jorge Ramirez-Ortiz83b9d1a2018-09-23 09:41:21 +02009
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
26typedef uint32_t(*rom_read_flash_f) (uint64_t src, uint8_t *dst, uint32_t len);
Boyan Karatotev7a4db8b2022-11-22 12:24:10 +000027uint32_t rcar_rom_secure_boot_api(uint32_t key, uint32_t cert,
Jorge Ramirez-Ortiz83b9d1a2018-09-23 09:41:21 +020028 rom_read_flash_f f);
29uint32_t rcar_rom_get_lcs(uint32_t *lcs);
30
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000031#endif /* ROM_API_H */