mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 23:23:13 +00:00
bsps/aarch64/xen: Add SMP support
This commit is contained in:
committed by
Kinsey Moore
parent
ec6566dee9
commit
97f1ae9017
@@ -71,6 +71,14 @@ extern "C" {
|
|||||||
|
|
||||||
BSP_START_TEXT_SECTION void xen_setup_mmu_and_cache( void );
|
BSP_START_TEXT_SECTION void xen_setup_mmu_and_cache( void );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Xen-specific set up of the MMU for non-primary
|
||||||
|
* cores.
|
||||||
|
*
|
||||||
|
* Provide in the application to override the defaults in the BSP.
|
||||||
|
*/
|
||||||
|
BSP_START_TEXT_SECTION void xen_setup_secondary_cpu_mmu_and_cache( void );
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|||||||
@@ -37,9 +37,34 @@
|
|||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
#include <bsp/start.h>
|
#include <bsp/start.h>
|
||||||
|
|
||||||
|
#ifdef RTEMS_SMP
|
||||||
|
#include <rtems/score/aarch64-system-registers.h>
|
||||||
|
#include <rtems/score/smpimpl.h>
|
||||||
|
|
||||||
|
#include <bsp/irq-generic.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
BSP_START_TEXT_SECTION void bsp_start_hook_1( void )
|
BSP_START_TEXT_SECTION void bsp_start_hook_1( void )
|
||||||
{
|
{
|
||||||
AArch64_start_set_vector_base();
|
AArch64_start_set_vector_base();
|
||||||
|
|
||||||
|
#ifdef RTEMS_SMP
|
||||||
|
uint32_t cpu_index_self;
|
||||||
|
|
||||||
|
cpu_index_self = _SMP_Get_current_processor();
|
||||||
|
|
||||||
|
if ( cpu_index_self != 0 ) {
|
||||||
|
xen_setup_secondary_cpu_mmu_and_cache();
|
||||||
|
arm_gic_irq_initialize_secondary_cpu();
|
||||||
|
|
||||||
|
bsp_interrupt_vector_enable( ARM_GIC_IRQ_SGI_0 );
|
||||||
|
_SMP_Start_multitasking_on_secondary_processor(
|
||||||
|
_Per_CPU_Get_by_index( cpu_index_self )
|
||||||
|
);
|
||||||
|
/* Unreached */
|
||||||
|
}
|
||||||
|
#endif /* RTEMS_SMP */
|
||||||
|
|
||||||
xen_setup_mmu_and_cache();
|
xen_setup_mmu_and_cache();
|
||||||
bsp_start_clear_bss();
|
bsp_start_clear_bss();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,3 +56,12 @@ xen_setup_mmu_and_cache( void )
|
|||||||
|
|
||||||
aarch64_mmu_enable( control );
|
aarch64_mmu_enable( control );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BSP_START_TEXT_SECTION void xen_setup_secondary_cpu_mmu_and_cache( void )
|
||||||
|
{
|
||||||
|
aarch64_mmu_control *control = &aarch64_mmu_instance;
|
||||||
|
|
||||||
|
/* Perform basic MMU setup */
|
||||||
|
aarch64_mmu_setup();
|
||||||
|
aarch64_mmu_enable( control );
|
||||||
|
}
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ links:
|
|||||||
uid: abi
|
uid: abi
|
||||||
- role: build-dependency
|
- role: build-dependency
|
||||||
uid: obj
|
uid: obj
|
||||||
|
- role: build-dependency
|
||||||
|
uid: objsmp
|
||||||
- role: build-dependency
|
- role: build-dependency
|
||||||
uid: optloadoff
|
uid: optloadoff
|
||||||
- role: build-dependency
|
- role: build-dependency
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ enabled-by:
|
|||||||
- arm/realview_pbx_a9_qemu
|
- arm/realview_pbx_a9_qemu
|
||||||
- arm/xilinx_zynqmp_ultra96
|
- arm/xilinx_zynqmp_ultra96
|
||||||
- bsps/aarch64/xilinx-zynqmp
|
- bsps/aarch64/xilinx-zynqmp
|
||||||
|
- bsps/aarch64/xen
|
||||||
- bsps/arm/xilinx-zynq
|
- bsps/arm/xilinx-zynq
|
||||||
- bsps/powerpc/qoriq
|
- bsps/powerpc/qoriq
|
||||||
- i386/pc586sse
|
- i386/pc586sse
|
||||||
|
|||||||
Reference in New Issue
Block a user