hikey960_image_load.c 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright (c) 2017-2022, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <assert.h>
  7. #include <common/bl_common.h>
  8. #include <common/desc_image_load.h>
  9. #include <plat/common/platform.h>
  10. /*******************************************************************************
  11. * This function flushes the data structures so that they are visible
  12. * in memory for the next BL image.
  13. ******************************************************************************/
  14. void plat_flush_next_bl_params(void)
  15. {
  16. flush_bl_params_desc();
  17. }
  18. /*******************************************************************************
  19. * This function returns the list of loadable images.
  20. ******************************************************************************/
  21. bl_load_info_t *plat_get_bl_image_load_info(void)
  22. {
  23. return get_bl_load_info_from_mem_params_desc();
  24. }
  25. /*******************************************************************************
  26. * ARM helper function to return the list of executable images. Since the default
  27. * descriptors are allocated within BL2 RW memory, this prevents BL31/BL32
  28. * overlay of BL2 memory. Hence this function also copies the descriptors to a
  29. * pre-allocated memory indicated by ARM_BL2_MEM_DESC_BASE.
  30. ******************************************************************************/
  31. struct bl_params *hikey960_get_next_bl_params(void)
  32. {
  33. bl_params_t *next_bl_params;
  34. next_bl_params = get_next_bl_params_from_mem_params_desc();
  35. assert(next_bl_params != NULL);
  36. populate_next_bl_params_config(next_bl_params);
  37. return next_bl_params;
  38. }
  39. /*******************************************************************************
  40. * This function returns the list of executable images.
  41. ******************************************************************************/
  42. bl_params_t *plat_get_next_bl_params(void)
  43. {
  44. return hikey960_get_next_bl_params();
  45. }