mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-11-16 12:34:45 +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 );
|
||||
|
||||
/**
|
||||
* @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
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
@@ -37,9 +37,34 @@
|
||||
#include <bsp.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 )
|
||||
{
|
||||
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();
|
||||
bsp_start_clear_bss();
|
||||
}
|
||||
|
||||
@@ -56,3 +56,12 @@ xen_setup_mmu_and_cache( void )
|
||||
|
||||
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
|
||||
- role: build-dependency
|
||||
uid: obj
|
||||
- role: build-dependency
|
||||
uid: objsmp
|
||||
- role: build-dependency
|
||||
uid: optloadoff
|
||||
- role: build-dependency
|
||||
|
||||
@@ -21,6 +21,7 @@ enabled-by:
|
||||
- arm/realview_pbx_a9_qemu
|
||||
- arm/xilinx_zynqmp_ultra96
|
||||
- bsps/aarch64/xilinx-zynqmp
|
||||
- bsps/aarch64/xen
|
||||
- bsps/arm/xilinx-zynq
|
||||
- bsps/powerpc/qoriq
|
||||
- i386/pc586sse
|
||||
|
||||
Reference in New Issue
Block a user