board_arm_helpers.S 866 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <asm_macros.S>
  7. #include <common/bl_common.h>
  8. #include <platform_def.h>
  9. .globl plat_report_exception
  10. /* ---------------------------------------------
  11. * void plat_report_exception(unsigned int type)
  12. * Function to report an unhandled exception
  13. * with platform-specific means.
  14. * On FVP platform, it updates the LEDs
  15. * to indicate where we are
  16. * ---------------------------------------------
  17. */
  18. func plat_report_exception
  19. mrs x1, CurrentEl
  20. lsr x1, x1, #MODE_EL_SHIFT
  21. lsl x1, x1, #V2M_SYS_LED_EL_SHIFT
  22. lsl x0, x0, #V2M_SYS_LED_EC_SHIFT
  23. mov x2, #(SECURE << V2M_SYS_LED_SS_SHIFT)
  24. orr x0, x0, x2
  25. orr x0, x0, x1
  26. mov x1, #V2M_SYSREGS_BASE
  27. add x1, x1, #V2M_SYS_LED
  28. str w0, [x1]
  29. ret
  30. endfunc plat_report_exception