imx7_bl2_mem_params_desc.c 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <platform_def.h>
  7. #include <common/bl_common.h>
  8. #include <common/desc_image_load.h>
  9. #include <plat/common/platform.h>
  10. static bl_mem_params_node_t bl2_mem_params_descs[] = {
  11. {
  12. .image_id = BL32_IMAGE_ID,
  13. SET_STATIC_PARAM_HEAD(ep_info, PARAM_EP, VERSION_2,
  14. entry_point_info_t,
  15. SECURE | EXECUTABLE | EP_FIRST_EXE),
  16. .ep_info.pc = BL32_BASE,
  17. SET_STATIC_PARAM_HEAD(image_info, PARAM_EP, VERSION_2,
  18. image_info_t, 0),
  19. .image_info.image_base = IMX7_OPTEE_BASE,
  20. .image_info.image_max_size = IMX7_OPTEE_SIZE,
  21. .next_handoff_image_id = BL33_IMAGE_ID,
  22. },
  23. {
  24. .image_id = BL32_EXTRA1_IMAGE_ID,
  25. SET_STATIC_PARAM_HEAD(ep_info, PARAM_EP, VERSION_2,
  26. entry_point_info_t,
  27. SECURE | NON_EXECUTABLE),
  28. SET_STATIC_PARAM_HEAD(image_info, PARAM_EP, VERSION_2,
  29. image_info_t, IMAGE_ATTRIB_SKIP_LOADING),
  30. .image_info.image_base = IMX7_OPTEE_BASE,
  31. .image_info.image_max_size = IMX7_OPTEE_SIZE,
  32. .next_handoff_image_id = INVALID_IMAGE_ID,
  33. },
  34. {
  35. /* This is a zero sized image so we don't set base or size */
  36. .image_id = BL32_EXTRA2_IMAGE_ID,
  37. SET_STATIC_PARAM_HEAD(ep_info, PARAM_EP,
  38. VERSION_2, entry_point_info_t,
  39. SECURE | NON_EXECUTABLE),
  40. SET_STATIC_PARAM_HEAD(image_info, PARAM_EP,
  41. VERSION_2, image_info_t,
  42. IMAGE_ATTRIB_SKIP_LOADING),
  43. .next_handoff_image_id = INVALID_IMAGE_ID,
  44. },
  45. {
  46. .image_id = BL33_IMAGE_ID,
  47. SET_STATIC_PARAM_HEAD(ep_info, PARAM_EP, VERSION_2,
  48. entry_point_info_t,
  49. NON_SECURE | EXECUTABLE),
  50. # ifdef PRELOADED_BL33_BASE
  51. .ep_info.pc = PRELOADED_BL33_BASE,
  52. SET_STATIC_PARAM_HEAD(image_info, PARAM_EP,
  53. VERSION_2, image_info_t,
  54. IMAGE_ATTRIB_SKIP_LOADING),
  55. # else
  56. .ep_info.pc = BL33_BASE,
  57. SET_STATIC_PARAM_HEAD(image_info, PARAM_EP,
  58. VERSION_2, image_info_t, 0),
  59. .image_info.image_base = IMX7_UBOOT_BASE,
  60. .image_info.image_max_size = IMX7_UBOOT_SIZE,
  61. # endif /* PRELOADED_BL33_BASE */
  62. .next_handoff_image_id = INVALID_IMAGE_ID,
  63. }
  64. };
  65. REGISTER_BL_IMAGE_DESCS(bl2_mem_params_descs);