Commit Graph

43 Commits

Author SHA1 Message Date
Sebastian Huber
002c6067ba bsps: Add fatal source/code to bsp_reset()
Mark bsp_reset() as no-return.  Use default BSP fatal handler in lm32 and m68k
BSPs.  Remove empty bsp_reset() implementation.

Update #5067.
2024-08-23 14:54:37 +00:00
Sebastian Huber
4f1b0ca27a bsps: Request SMP shutdown in fatal extension 2024-06-10 17:32:54 +00:00
Sebastian Huber
0bbb25b178 bsps: Disable interrupts in fatal extension 2024-06-10 17:32:54 +00:00
Kinsey Moore
5b22003411 bsps: Remove unused includes 2023-10-13 19:02:15 -05:00
Sebastian Huber
f69326d0c2 bsps: Improve Doxygen file comments 2023-05-26 06:56:11 +02:00
Sebastian Huber
bcef89f236 Update company name
The embedded brains GmbH & Co. KG is the legal successor of embedded
brains GmbH.
2023-05-20 11:05:26 +02:00
Sebastian Huber
962904cd94 bsps: Fix format specifier
Close #4722.
2022-09-23 08:37:59 +02:00
Padmarao Begari
d0b92735b0 bsps/shared/: Use device tree blob
If the bsp is integrated and supported a device tree
blob(dtb) then use dtb instead of using it from
the U-Boot (BSP_START_COPY_FDT_FROM_U_BOOT=False).
2022-09-20 12:00:51 -05:00
Joel Sherrill
d6ebf4067e bsps/shared/*: Change license to BSD-2
Updates #3053.
2022-06-15 12:35:18 -05:00
Joel Sherrill
9bf813c5f1 bsps/shared/: Scripted embedded brains header file clean up
Updates #4625.
2022-03-10 08:43:50 +01:00
Sebastian Huber
e3f70b379b bsps: Avoid use of memcpy() in bsp_fdt_copy()
The memcpy() function may be not loaded at the time bsp_fdt_copy() is
called.
2022-01-19 08:11:20 +01:00
Sebastian Huber
00081b30a8 Fix device tree blob alignment
A device tree blob must be aligned on an 8-byte boundary.
2022-01-11 18:01:17 +01:00
Sebastian Huber
d7205f0083 libc: Optimize malloc() initialization
The BSPs provide memory for the separate C Program Heap initialization
via _Memory_Get().  Most BSPs provide exactly one memory area.  Only two
BSPs provide more than one memory area (arm/altera-cyclone-v and
bsps/powerpc/mpc55xxevb).  Only if more than one memory area is
provided, there is a need to use _Heap_Extend().  Provide two
implementations to initialize the separate C Program Heap and let the
BSP select one of the implementations based on the number of provided
memory areas.  This gets rid of a dependency on _Heap_Extend().  It
also avoids dead code sections for most BSPs.

Change licence to BSD-2-Clause according to file history.

Update #3053.
2021-11-30 08:33:12 +01:00
Sebastian Huber
3d0620b607 score: Optimize Workspace Handler initialization
The BSPs provide memory for the workspace initialization via
_Memory_Get().  Most BSPs provide exactly one memory area.  Only two
BSPs provide more than one memory area (arm/altera-cyclone-v and
bsps/powerpc/mpc55xxevb).  Only if more than one memory area is
provided, there is a need to use _Heap_Extend().  Provide two
implementations to initialize the workspace handler and let the BSP
select one of the implementations based on the number of provided memory
areas.  This gets rid of a dependency on _Heap_Extend().  It also avoids
dead code sections for most BSPs.
2021-11-30 08:31:59 +01:00
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