msm8916_sp_min_setup.c 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright (c) 2022-2023, Stephan Gerhold <stephan@gerhold.net>
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <arch.h>
  7. #include <common/debug.h>
  8. #include <lib/xlat_tables/xlat_mmu_helpers.h>
  9. #include <platform_sp_min.h>
  10. #include "../msm8916_config.h"
  11. #include "../msm8916_setup.h"
  12. static struct {
  13. entry_point_info_t bl33;
  14. } image_ep_info = {
  15. /* BL33 entry point */
  16. SET_STATIC_PARAM_HEAD(bl33, PARAM_EP, VERSION_1,
  17. entry_point_info_t, NON_SECURE),
  18. .bl33.pc = PRELOADED_BL33_BASE,
  19. .bl33.spsr = SPSR_MODE32(MODE32_hyp, SPSR_T_ARM, SPSR_E_LITTLE,
  20. DISABLE_ALL_EXCEPTIONS),
  21. };
  22. void sp_min_early_platform_setup2(u_register_t arg0, u_register_t arg1,
  23. u_register_t arg2, u_register_t arg3)
  24. {
  25. msm8916_early_platform_setup();
  26. msm8916_configure_early();
  27. }
  28. void sp_min_plat_arch_setup(void)
  29. {
  30. msm8916_plat_arch_setup(BL32_BASE, BL32_END - BL32_BASE);
  31. enable_mmu_svc_mon(0);
  32. }
  33. void sp_min_platform_setup(void)
  34. {
  35. INFO("SP_MIN: Platform setup start\n");
  36. msm8916_platform_setup();
  37. msm8916_configure();
  38. INFO("SP_MIN: Platform setup done\n");
  39. }
  40. entry_point_info_t *sp_min_plat_get_bl33_ep_info(void)
  41. {
  42. return &image_ep_info.bl33;
  43. }