Commit Graph

29 Commits

Author SHA1 Message Date
Kinsey Moore
3647725832 bsps/shared: Add PSCI SMP startup support
This adds the SMP function that supports spinup of additional CPU cores
using the ARM standard PSCI inteface. This interface is provided by QEMU
as well as ARM Trusted Firmware running in monitor mode (EL3) on ARMv7 and
AArch64 CPUs. This supports activation va SMC or HVC instructions
depending on BSP configuration.
2021-09-21 08:58:31 -05:00
Sebastian Huber
78b8360163 bsps: Fix bsp_fatal_extension()
The heap protection is conditional.
2021-07-23 16:01:30 +02:00
Chris Johns
350f501a39 bsp: Remove fatal from exit(0). Add extended heap error output 2021-07-23 08:56:14 +10:00
Sebastian Huber
de7df0419d bsps: Fix legacy build 2021-02-26 09:48:41 +01:00
Sebastian Huber
7480c34698 bsps: Add default rtems_get_target_hash()
Update #4267.
2021-02-26 09:10:09 +01:00
Sebastian Huber
32b0d6f84a bsps: Change license to BSD-2-Clause of some files
Change license to BSD-2-Clause according to file histories and
re-licensing agreement.

Update #3899.
2021-02-24 11:15:07 +01:00
Sebastian Huber
368fab5a82 bsps: Print CPU in default fatal error extension 2020-12-10 07:58:03 +01:00
Kinsey Moore
cb2afd2eaa bsps/shared: Add PSCI-based bspreset implementation
This adds a bsp_reset implementation based on the ARM PSCI
specification often present in ARMv8 systems.
2020-10-05 16:11:39 -05:00
Christian Mauderer
02c9eb8567 bsps/fdt: Make sure data is cache aligned
The cache of the fdt blob is flushed after copy. Therefore it should be
aligned.
2020-07-31 08:26:14 +02:00
Sebastian Huber
2d07ce6d21 config: Add CONFIGURE_DIRTY_MEMORY
Replace the BSP_DIRTY_MEMORY BSP option with a CONFIGURE_DIRTY_MEMORY
configuration option.

Update #3843.
2020-02-06 15:19:36 +01:00
Sebastian Huber
eea21eaca1 bsps: Rework work area initialization
The work area initialization was done by the BSP through
bsp_work_area_initialize(). This approach predated the system
initialization through the system initialization linker set. The
workspace and C program heap were unconditionally initialized.  The aim
is to support RTEMS application configurations which do not need the
workspace and C program heap.  In these configurations, the workspace
and C prgram heap should not get initialized.

Change all bsp_work_area_initialize() to implement _Memory_Get()
instead.  Move the dirty memory, sbrk(), per-CPU data, workspace, and
malloc() heap initialization into separate system initialization steps.
This makes it also easier to test the individual initialization steps.

This change adds a dependency to _Heap_Extend() to all BSPs.  This
dependency will be removed in a follow up change.

Update #3838.
2020-02-04 06:06:41 +01:00
Sebastian Huber
c331bdc777 record: Allow tracing of ISR disable/enable
Directly use the CPU port API in boot_card() to allow tracing of the
higher level interrupt disable/enable routines, e.g.
_ISR_Local_disable() and _ISR_Local_enable().  Currently, there is no
configuration option to enable this.  Below is a patch.  It may be used
to investigate some nasty low level bugs in the system.

Update #3665.

diff --git a/cpukit/include/rtems/score/isrlevel.h b/cpukit/include/rtems/score/isrlevel.h
index c42451d010..46d361ddc2 100644
--- a/cpukit/include/rtems/score/isrlevel.h
+++ b/cpukit/include/rtems/score/isrlevel.h
@@ -40,6 +40,10 @@ extern "C" {
  */
 typedef uint32_t   ISR_Level;

+uint32_t rtems_record_interrupt_disable( void );
+
+void rtems_record_interrupt_enable( uint32_t level );
+
 /**
  *  @brief Disables interrupts on this processor.
  *
@@ -56,8 +60,7 @@ typedef uint32_t   ISR_Level;
  */
 #define _ISR_Local_disable( _level ) \
   do { \
-    _CPU_ISR_Disable( _level ); \
-    RTEMS_COMPILER_MEMORY_BARRIER(); \
+    _level = rtems_record_interrupt_disable(); \
   } while (0)

 /**
@@ -72,10 +75,7 @@ typedef uint32_t   ISR_Level;
  *  _ISR_Local_disable().
  */
 #define _ISR_Local_enable( _level ) \
-  do { \
-    RTEMS_COMPILER_MEMORY_BARRIER(); \
-    _CPU_ISR_Enable( _level ); \
-  } while (0)
+  rtems_record_interrupt_enable( _level )

 /**
  *  @brief Temporarily enables interrupts on this processor.
@@ -98,9 +98,8 @@ typedef uint32_t   ISR_Level;
  */
 #define _ISR_Local_flash( _level ) \
   do { \
-    RTEMS_COMPILER_MEMORY_BARRIER(); \
-    _CPU_ISR_Flash( _level ); \
-    RTEMS_COMPILER_MEMORY_BARRIER(); \
+    rtems_record_interrupt_enable( _level ); \
+    _level = rtems_record_interrupt_disable(); \
   } while (0)

 /
2019-09-06 08:09:34 +02:00
Sebastian Huber
5ee70c5487 Add and use THREAD_DEFAULT_MAXIMUM_NAME_SIZE 2019-07-30 07:21:06 +02:00
Sebastian Huber
212663bede bsps: Adjust architecture Doxygen groups
- Use CamelCase as it is not used in our C code.  Enables simple search and
   replace.

 - Prefix with "RTEMS" to aid deployment and integration.  It aids
   searching and sorting.

Update #3706.
2019-03-04 07:51:38 +01:00
Sebastian Huber
fad3f79b88 bsps: BSP_INTERRUPT_STACK_AT_WORK_AREA_BEGIN
Remove the BSP_INTERRUPT_STACK_AT_WORK_AREA_BEGIN hack.  The interrupt
stacks are now allocated by the linker.

Update #3459.
2018-09-03 07:03:09 +02:00
Sebastian Huber
5c5b021f51 bsps: Move bspsmpgetcurrentprocessor.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-20 09:49:38 +02:00
Sebastian Huber
2584f5b2b5 bsps: Move bspsmp.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-20 09:49:38 +02:00
Sebastian Huber
bc010a8d48 bsps: Move setvec.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-20 09:49:38 +02:00
Sebastian Huber
a4429391b6 bsps: Move sbrk.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-20 09:49:38 +02:00
Sebastian Huber
c4ccf26cb7 bsps: Convert all bsp_predriver_hook()
Use RTEMS_SYSINIT_ITEM() instead.

Update #2408.
2018-04-20 09:49:36 +02:00
Sebastian Huber
5a06b187fb bsps: Move bspgetworkarea.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-20 09:49:35 +02:00
Sebastian Huber
0b93d4f843 bsps: Move bspstart.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-20 09:49:35 +02:00
Sebastian Huber
07364103a8 bsps: Move bspreset_loop.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-20 09:49:35 +02:00
Sebastian Huber
554e39c8e5 bsps: Move bspreset.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-20 09:49:34 +02:00
Sebastian Huber
43bda786e7 bsps: Move bspclean.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-20 09:49:34 +02:00
Sebastian Huber
0a09ac58ac bsps: Move stackalloc.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-16 14:56:10 +02:00
Sebastian Huber
9d44ae78cf bsps: Move bsp-uboot-board-info.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-16 14:56:10 +02:00
Sebastian Huber
1cba1de115 bsps: Move bsp-fdt.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-16 14:56:10 +02:00
Sebastian Huber
c5fe44319e bsps: Move bootcard.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-12 07:09:12 +02:00