mss_scp_bl2_format.h 946 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright (C) 2018 Marvell International Ltd.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. * https://spdx.org/licenses
  6. */
  7. #ifndef MSS_SCP_BL2_FORMAT_H
  8. #define MSS_SCP_BL2_FORMAT_H
  9. #define MAX_NR_OF_FILES 8
  10. #define FILE_MAGIC 0xddd01ff
  11. #define HEADER_VERSION 0x1
  12. #define MSS_IDRAM_SIZE 0x10000 /* 64KB */
  13. #define MSS_SRAM_SIZE 0x8000 /* 32KB */
  14. /* Types definitions */
  15. typedef struct file_header {
  16. /* Magic specific for concatenated file (used for validation) */
  17. uint32_t magic;
  18. uint32_t nr_of_imgs; /* Number of images concatenated */
  19. } file_header_t;
  20. /* Types definitions */
  21. enum cm3_t {
  22. MSS_AP,
  23. MSS_CP0,
  24. MSS_CP1,
  25. MSS_CP2,
  26. MSS_CP3,
  27. MG_CP0,
  28. MG_CP1,
  29. MG_CP2,
  30. };
  31. typedef struct img_header {
  32. uint32_t type; /* CM3 type, can be one of cm3_t */
  33. uint32_t length; /* Image length */
  34. uint32_t version; /* For sanity checks and future
  35. * extended functionality
  36. */
  37. } img_header_t;
  38. #endif /* MSS_SCP_BL2_FORMAT_H */