Commit Graph
392 Commits
Author SHA1 Message Date
Joel Sherrill 255fe433fd cpukit/: Scripted embedded brains header file clean up
Updates #4625.
2022-03-10 08:43:49 +01:00
Joel Sherrill bd2e898c9e sapi/src/*.c: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:05 -06:00
Sebastian Huber 4969af4102 rtems: Add RTEMS_FATAL_SOURCE_SPURIOUS_INTERRUPT
Add RTEMS_FATAL_SOURCE_SPURIOUS_INTERRUPT as the fatal source for
spurious interrupts.  Use the interrupt vector number of the spurious
interrupt for the fatal code.

Update #3269.
2021-07-26 07:54:25 +02:00
Sebastian Huber fad01e6cf9 score: Add PER_CPU_DATA_NEED_INITIALIZATION()
Make the initialization of the per-CPU data optional.

Change license to BSD-2-Clause according to file history and
re-licensing agreement.

Update #3053.
2021-06-10 15:55:47 +02:00
Sebastian Huber 2b32146400 Remove superfluous <rtems/score/wkspace.h> includes 2021-04-20 19:18:23 +02:00
Sebastian Huber bc6ffc3be8 Add system initialization step for target hash
Update #4267.
2021-02-26 09:10:09 +01:00
Sebastian Huber d8bfa5a9bc rtems: Add rtems_get_build_label()
Update #4269.
2021-02-25 16:16:16 +01:00
Sebastian Huber d138a7906a config: Adjust stack allocator initialization
Use the right system initialization step for the stack allocator
initialization.  Do the stack allocator initialization before the
workspace initialization so that _Memory_Allocate() can be used to get
memory for the allocator.
2021-02-24 13:32:35 +01:00
Sebastian Huber 0b263b0eb7 score: Remove _Objects_Open()
Use the type safe _Objects_Open_u32() instead.  Return the object
identifier to enforce a common usage pattern.
2021-02-24 09:22:36 +01:00
Sebastian Huber 3272dcb364 Update copyright notice to 2021 2021-01-27 09:41:07 +01:00
Sebastian Huber c734e8660f cpucounter: Increase conversion accuracy
The maximum frequency is UINT32_MAX.  Converted to a uint64_t variable
it can be shifted by 32.  The addition does not overflow since bin_per_s
- 1 is UINT32_MAX.
2021-01-26 15:29:36 +01:00
Sebastian Huber 3db9c820e5 sapi: Canonicalize @defgroup and @file comments
Adjust group identifier and names to be in line with a common pattern.
Use common phrases for the group and file brief descriptions.

Update #3706.
2020-12-02 07:45:53 +01:00
Sebastian Huber e07088d9ba rtems: Canonicalize implementation Doxygen groups
Rename Classic API top-level group from Classic to RTEMSImplClassic.
Use RTEMSImplClassic as a prefix for the subgroups.  Change the group
names to be in line with the API group names.  Use common phrases for
the group brief descriptions.

Update #3706.
2020-12-02 07:45:53 +01:00
Sebastian Huber b1a8be45b0 rtems: Simplify includes in version.c 2020-12-02 07:45:53 +01:00
Sebastian Huber 3732c93182 posix: Delete unused _POSIX_Fatal_error() 2020-12-02 07:45:52 +01:00
Sebastian Huber 657e30c135 config: CONFIGURE_INIT_TASK_CONSTRUCT_STORAGE_SIZE
In order to better support applications which use the new
rtems_task_construct() directive add the
CONFIGURE_INIT_TASK_CONSTURCT_STORAGE_SIZE configuration option.  If
this option is specified, then the Classic API initialization task is
constructed with rtems_task_construct().

Update #4181.
2020-11-26 11:10:22 +01:00
Sebastian Huber 5353ea89d7 rtems: Move from <rtems.h> to <rtems/config.h>
Move configuration related declarations and definitions to
<rtems/config.h>.  The goal is to make <rtems.h> an include only header
file.
2020-09-18 18:55:09 +02:00
Sebastian Huber c312f3110e CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE
Add this application configuration option.  This configuration option can be
used to reserve space for the dynamic linking of modules with thread-local
storage objects.

Add RTEMS_TASK_STORAGE_ALIGNMENT to define the minium alignment of a
thread-local storage size.

Update #4074.
2020-09-17 17:42:25 +02:00
Sebastian Huber c7e30854f2 rtems: Add _RTEMS_Name_to_id()
Simplify object name to identifier directives.  Using
_RTEMS_Name_to_id() to implement the directives enables a tail call
optimization.

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

Update #3053.
2020-08-31 16:19:57 +02:00
Sebastian Huber 90390118c0 rtems: Move declartion of _RTEMS_version
Close #3978.
2020-07-14 07:25:45 +02:00
Sebastian Huber 3ce3cdfc5b score: Update _Copyright_Notice
Add the _Copyright_Notice to a special linker set to prevent a garbage
collection of this item.
2020-05-06 08:02:15 +02:00
Sebastian Huber d30a352d4c rtems: Deprecate _Copyright_Notice
Close #3973.
2020-05-06 08:01:57 +02:00
Sebastian Huber 1af8e45bb7 rtems: Add rtems_get_copyright_notice()
Update #3973.
2020-05-06 07:47:34 +02:00
Sebastian Huber 34b098edc5 rtems: Deprecate use of _RTEMS_version
Close #3970.
2020-05-06 07:39:10 +02:00
Sebastian Huber cfe8f7a9b7 doxygen: Switch @brief and @ingroup
This order change fixes the Latex documentation build via Doxygen.
2020-04-28 09:04:00 +02:00
Sebastian Huber 3d73642d9e sapi: Add param check to rtems_extension_create()
Check that the extensions table is not NULL.  Change format.

Update #3953.
2020-04-17 19:51:11 +02:00
Sebastian Huber 80cf60efec Canonicalize config.h include
Use the following variant which was already used by most source files:

  #ifdef HAVE_CONFIG_H
  #include "config.h"
  #endif
2020-04-16 07:30:00 +02:00
Sebastian Huber c36fae22fe config: Initialize IO drivers on demand 2020-02-26 08:23:28 +01:00
Sebastian Huber ba74ebde74 libio: Add POSIX user environment pointer to TCB
The IO library used a POSIX key to store an optional POSIX user
environment pointer.  This pulled in the POSIX keys support in every
application configuration.  Add a user environment pointer to the thread
control block (TCB) instead.  Applications which do not need the POSIX
user environment will just get an overhead of one pointer per thread.

Close #3882.
2020-02-25 07:18:26 +01:00
Sebastian Huber 8ecbc3826e sysinit: Add RTEMS_SYSINIT_ZERO_MEMORY
Use a dedicate system initialization step to zero the memory used for
the workspace and C program heap.

This avoids dead code in case CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY is
not configured.
2020-02-06 15:19:35 +01:00
Sebastian Huber e44ae805f7 config: Add CONFIGURE_VERBOSE_SYSTEM_INITIALIZATION
Update #3861.
2020-02-04 06:24:26 +01:00
Sebastian Huber c344e5828c Use RTEMS_SYSINIT_ORDER_LAST_BUT_5
Use RTEMS_SYSINIT_ORDER_LAST_BUT_5 instead of RTEMS_SYSINIT_ORDER_LAST
to allow applications and support functions to place system
initialization handlers behind the standard handlers.

Update #3838.
2020-02-04 06:06:42 +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 3859cd63af rtems-5: Improve heap fatal error information
Update #3806.
2019-11-05 07:29:00 +01:00
Sebastian Huber eaa415b2c7 rtems: Make rtems_version_control_key() safer
Return the empty string instead of a NULL pointer if no version key is
available.
2019-09-09 07:04:53 +02:00
Sebastian Huber f9219db2a9 rtems: Add rtems_scheduler_get_processor_maximum()
Add rtems_scheduler_get_processor_maximum() as a replacement for
rtems_get_processor_count(). The rtems_get_processor_count() is a bit
orphaned. Adopt it by the Scheduler Manager. The count is also
misleading, since the processor set may have gaps and the actual count
of online processors may be less than the value returned by
rtems_get_processor_count().

Update #3732.
2019-04-09 08:06:46 +02:00
Sebastian Huber 4c20da4be4 doxygen: Rename Score* groups in RTEMSScore*
Update #3706
2019-04-04 09:18:55 +02:00
Andreas Dachsberger e78e7fe0de doxygen: Added Version to API->Classic
Update #3706.
2019-04-04 08:12:36 +02:00
Sebastian Huber 3fe215502a Remove superfluous <rtems/system.h> includes 2019-03-14 13:13:27 +01:00
Sebastian Huber 7c19e50bdd score: Fix per-CPU data allocation
Allocate the per-CPU data for secondary processors directly from the
heap areas before heap initialization and not via
_Workspace_Allocate_aligned().  This avoids dependency on the workspace
allocator.  It fixes also a problem on some platforms (e.g. QorIQ) where
at this early point in the system initialization the top of the RAM is
used by low-level startup code on secondary processors (boot pages).

Update #3507.
2018-12-18 08:50:08 +01:00
Sebastian Huber 21275b58a5 score: Static Objects_Information initialization
Statically allocate the objects information together with the initial
set of objects either via <rtems/confdefs.h>.  Provide default object
informations with zero objects via librtemscpu.a.  This greatly
simplifies the workspace size estimate.  RTEMS applications which do not
use the unlimited objects option are easier to debug since all objects
reside now in statically allocated objects of the right types.

Close #3621.
2018-12-14 07:03:29 +01:00
Sebastian Huber 0f5b2c0906 rtems: Use object information to get config max
Use functions instead of macros.  Add missing
rtems_configuration_get_maximum_*() functions.

Update #3621.
2018-12-14 06:57:55 +01:00
Sebastian Huber 9c9c6a93b1 score: Remove Objects_Information::is_string
Use Objects_Information::name_length to store this information.

Update #3621.
2018-12-07 14:22:01 +01:00
Sebastian Huber b9ffb62467 Convert CPU counter ticks to/from sbintime_t
The sbintime_t is an efficient time format.  Add the ability to convert
CPU counter ticks to/from sbintime_t.
2018-12-03 09:45:37 +01:00
Sebastian Huber 242887bc56 Rename files to make them unique within cpukit
This allows to build librtemscpu.a in one rush in the future.
2018-10-04 08:02:28 +02:00
Sebastian Huber 65f868cac6 Add _CPU_Counter_frequency()
Add rtems_counter_frequency() API function.  Use it to initialize the
counter value converter via the new system initialization step
(RTEMS_SYSINIT_CPU_COUNTER).  This decouples the counter implementation
and the counter converter.  It avoids an unnecessary pull in of the
64-bit integer division from libgcc.

Update #3456.
2018-06-15 13:02:44 +02:00
Sebastian Huber de9b7d712b Add RTEMS_FATAL_SOURCE_INVALID_HEAP_FREE
An invalid heap usage such as a double free is usually a fatal error
since this indicates a use after free.  Replace the use of printk() in
free() with a fatal error.

Update #3437.
2018-06-05 08:49:56 +02:00
Sebastian Huber c934365f23 Update rtems_fatal_source_text()
Add RTEMS_FATAL_SOURCE_PANIC to rtems_fatal_source_text().

Update #3244.
2018-06-05 08:22:49 +02:00
Sebastian Huber 6c2b8a4b35 score: Use self-contained API mutex
Use a self-contained recursive mutex for API_Mutex_Control.  The API
mutexes are protected against asynchronous thread cancellation.

Add dedicated mutexes for libatomic and TOD.

Close #2629.
Close #2630.
2017-12-04 10:53:39 +01:00
Joel Sherrill 7b8c5b0def sapi/src/panic.c: Add include of <rtems/bspIo.h> 2017-11-29 13:03:40 -06:00