From f9c1e1172e9adb2616e761f2e3d671361c7971ba Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Mon, 4 Jul 2016 11:05:55 +0200 Subject: bsps/arm: Support recent bootloaders starting kernel in HYP mode When HYP mode is detected at startup then setup HYP mode vectors table (for future extensions) clean exceptions switching to HYP mode and switch CPU to ARM SVC mode. BSPs which want to use this support need to include next option in their configure.ac RTEMS_BSPOPTS_SET([BSP_START_IN_HYP_SUPPORT],[*],[1]) RTEMS_BSPOPTS_HELP([BSP_START_IN_HYP_SUPPORT], [Support start of BSP in ARM HYP mode]) AM_CONDITIONAL(BSP_START_IN_HYP_SUPPORT,test "$BSP_START_IN_HYP_SUPPORT" = "1") and need to include next lines in corresponding Makefile.am if BSP_START_IN_HYP_SUPPORT libbsp_a_SOURCES += ../shared/startup/bsp-start-in-hyp-support.S endif Updates #2783 --- c/src/lib/libbsp/arm/shared/startup/linkcmds.base | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'c/src/lib/libbsp/arm/shared/startup/linkcmds.base') diff --git a/c/src/lib/libbsp/arm/shared/startup/linkcmds.base b/c/src/lib/libbsp/arm/shared/startup/linkcmds.base index 8a653e9337..da2316a82f 100644 --- a/c/src/lib/libbsp/arm/shared/startup/linkcmds.base +++ b/c/src/lib/libbsp/arm/shared/startup/linkcmds.base @@ -53,10 +53,13 @@ bsp_stack_svc_size = ALIGN (bsp_stack_svc_size, bsp_stack_align); bsp_stack_und_size = DEFINED (bsp_stack_und_size) ? bsp_stack_und_size : 0; bsp_stack_und_size = ALIGN (bsp_stack_und_size, bsp_stack_align); +bsp_stack_hyp_size = DEFINED (bsp_stack_hyp_size) ? bsp_stack_hyp_size : 0; +bsp_stack_hyp_size = ALIGN (bsp_stack_hyp_size, bsp_stack_align); + bsp_stack_main_size = DEFINED (bsp_stack_main_size) ? bsp_stack_main_size : 0; bsp_stack_main_size = ALIGN (bsp_stack_main_size, bsp_stack_align); -bsp_stack_all_size = bsp_stack_abt_size + bsp_stack_fiq_size + bsp_stack_irq_size + bsp_stack_svc_size + bsp_stack_und_size + bsp_stack_main_size; +bsp_stack_all_size = bsp_stack_abt_size + bsp_stack_fiq_size + bsp_stack_irq_size + bsp_stack_svc_size + bsp_stack_und_size + bsp_stack_hyp_size + bsp_stack_main_size; bsp_processor_count = DEFINED (bsp_processor_count) ? bsp_processor_count : 1; @@ -312,6 +315,10 @@ SECTIONS { . = . + bsp_stack_und_size; bsp_stack_und_end = .; + bsp_stack_hyp_begin = .; + . = . + bsp_stack_hyp_size; + bsp_stack_hyp_end = .; + bsp_stack_abt_begin = .; . = . + bsp_stack_abt_size; bsp_stack_abt_end = .; -- cgit v1.2.3