Jorge Ramirez-Ortiz | 83b9d1a | 2018-09-23 09:41:21 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015-2017, Renesas Electronics Corporation. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 7 | #ifndef ROM_API_H |
| 8 | #define ROM_API_H |
Jorge Ramirez-Ortiz | 83b9d1a | 2018-09-23 09:41:21 +0200 | [diff] [blame] | 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); |
Boyan Karatotev | 7a4db8b | 2022-11-22 12:24:10 +0000 | [diff] [blame] | 27 | uint32_t rcar_rom_secure_boot_api(uint32_t key, uint32_t cert, |
Jorge Ramirez-Ortiz | 83b9d1a | 2018-09-23 09:41:21 +0200 | [diff] [blame] | 28 | rom_read_flash_f f); |
| 29 | uint32_t rcar_rom_get_lcs(uint32_t *lcs); |
| 30 | |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 31 | #endif /* ROM_API_H */ |