rom_api.h 929 B

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