Commit Graph

1436 Commits

Author SHA1 Message Date
Sebastian Huber
869071dfb2 score: Add _Processor_mask_And_not()
Add it for completeness.
2024-05-23 21:44:22 +00:00
Sebastian Huber
ab8817ca03 rtems: Add get/set interrupt priorities
Add directives to get and set the priority of an interrupt vector.

Implement the directives for the following BSP families:

* arm/lpc24xx
* arm/lpc32xx
* powerpc/mpc55xxevb
* powerpc/qoriq

Implement the directives for the following interrupt controllers:

* GICv2 and GICv3 (arm and aarch64)
* NVIC (arm)
* PLIC (riscv)

Update #5002.
2024-05-10 13:26:22 +00:00
Josef 'Jeff' Sipek
89ccc65d1a Remove a reference to xrpu from timetc.h
It was removed in 2007, so doesn't make a good example.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44462
2024-05-10 13:24:36 +00:00
Warner Losh
770ef97a45 sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2024-05-10 13:24:36 +00:00
Warner Losh
e11536c339 spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2024-05-10 13:24:36 +00:00
Pedro F. Giffuni
b294ef236d sys/sys: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
2024-05-10 13:24:36 +00:00
Sebastian Huber
237f8662ba score: Improve C/C++ standard compatibility
The processor mask implementation uses flsl() from <strings.h> which is
only BSD visible.  Move the implementation to a separate header file to
hide it from the API level.  This fixes build errors with GCC 14.
2024-04-30 01:39:05 -04:00
Sebastian Huber
1ef5fa07aa rtems: Avoid -Wundef warnings in API header 2024-03-23 10:56:25 +01:00
Sebastian Huber
d62f299b34 Do not define CONFIGURE_TICKS_PER_TIMESLICE to 0
Unconditionally make a CONFIGURE_TICKS_PER_TIMESLICE value less than or equal
to zero an error.

Update #4986.
2024-03-20 10:52:16 +01:00
Kinsey Moore
9c84037e93 cpukit: Gate ticks per timeslice config
Gate CONFIGURE_TICKS_PER_TIMESLICE appropriately behind
CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER.
2024-03-18 15:18:38 -05:00
Zack leung
5ee87eee8a Ensure ticks per timeslice is greater than zero 2024-03-14 12:58:59 -05:00
Sebastian Huber
fa17765bd4 crc: Add a CRC-24Q implementation 2024-02-16 09:32:04 +01:00
Matthew Joyce
2757b36098 base64: Add decoder 2024-02-16 09:32:04 +01:00
Sebastian Huber
c90e2b2fb2 base64: Make base64 encoding tables public
This makes them reusable.  Change the character type to uint8_t.
2024-02-16 09:32:04 +01:00
Sebastian Huber
317df86ba3 base64: Move base64 encoding support 2024-02-16 09:32:04 +01:00
Kinsey Moore
4c948a6ae5 cpukit/cache: Report coherent add area failures
This alters the API for rtems_cache_coherent_add_area to allow reporting
of failures that can occur during the process of adding a new area to
the coherent cache heap.
2024-01-26 08:19:15 -06:00
Bernd Moessner
a43163d058 flashdev.h: Add missing C++ include guards
Updates #4981
2024-01-16 10:57:43 -06:00
Kinsey Moore
150dcf5e47 libio: Clean up usage of rtems_termios_device_mode
This cleans up outputUsesInterrupts usage with rtems_termios_device_mode
enum values. The outputUsesInterrupts member was typed as an int, named
as if it were a boolean value, and used as if it were a
rtems_termios_device_mode enum. In this patch, values assigned to
outputUsesInterrupts have been converted to the corresponding
rtems_termios_device_mode enum value, conversions from
deviceOutputUsesInterrupts have been made explicit, and uses of
rtems_termios_device_mode enum values with deviceOutputUsesInterrupts
have been converted to booleans.
2024-01-10 14:43:53 -06:00
Sebastian Huber
d586b3c014 libtest: Add T_add_remark()
This can be used to report that nested test cases did run in a test
case.

Update #4971.
2023-11-28 14:30:46 +01:00
Sebastian Huber
71c024eaca score: Fix typo in name 2023-11-21 11:51:56 +01:00
Sebastian Huber
0c65f9faf3 score: Fix implicit integer conversion warnings 2023-11-02 13:40:33 +01:00
Sebastian Huber
51d596281c imfs: Constify rtems_tarfs_load()
Change the public image data type to a void pointer.
2023-11-02 13:34:22 +01:00
Kinsey Moore
894ce51cd5 cpukit/score: Convert Thread_Life_state to uint32_t
Thread_Life_state is used as a bitfield, but is declared as an enum.
This converts the enum typedef to a uint32_t typedef and associated bit
definitions.
2023-10-30 16:43:01 -05:00
Sebastian Huber
b8f1988f15 doxygen: Replace and move main page
Replace the main page with a high level description of the RTEMS feature
set similar to:

https://docs.rtems.org/branches/master/user/overview/index.html#features

The replaced content can be found in the RTEMS Classic API Guide:

https://docs.rtems.org/branches/master/c-user/overview.html

https://docs.rtems.org/branches/master/c-user/key_concepts.html

Update #3705.
2023-10-23 11:16:39 +02:00
Sebastian Huber
c15132aafd mpci: Hide implementation details
This improves the standard compatibility of API headers.  It fixes
errors like this if RTEMS_MULTIPROCESSING is enabled:

cpukit/include/rtems/score/processormask.h: In function 'uint32_t _Processor_mask_Find_last_set(const Processor_mask*)':
cpukit/include/rtems/score/processormask.h:339:21: error: 'flsl' was not declared in this scope
  339 |   return (uint32_t) __BIT_FLS( CPU_MAXIMUM_PROCESSORS, a );
      |                     ^~~~~~~~~
2023-10-20 11:16:53 +02:00
Sebastian Huber
ee63681aeb tests: Add header for RTEMS test printer
The <rtems/test-info.h> header file is required for every RTEMS test
program.  Move the RTEMS test printer support to a dedicated header file
<rtems/test-printer.h>.  This removes an unnecessary dependency to the
RTEMS printer support in <rtems/test-info.h>.

Tests using the RTEMS Testing Framework no longer depend on the
<rtems/printer.h>.
2023-09-26 08:04:30 +02:00
Sebastian Huber
2111497c0f rtems: rtems_configuration_get_interrupt_stack_size()
Fix rtems_configuration_get_interrupt_stack_size() for some code models.

The _ISR_Stack_size symbol has an arbitrary absolute address and may not
be representable in the code model used by the compiler.

Update #4953.
2023-09-15 10:44:08 +02:00
Sebastian Huber
206bbeb31b score: Fix TLS support for some code models
Store symbols with an arbitrary absolute address such as _TLS_Size,
_TLS_Alignment, _TLS_Data_size, and _TLS_BSS_size in an object to avoid issues
with some code models.

Update #4953.
2023-09-15 10:44:08 +02:00
Sebastian Huber
0add2d2edc score: Fix RTEMS_DEFINE_GLOBAL_SYMBOL()
The availability of a proper RTEMS_DEFINE_GLOBAL_SYMBOL() implementation
depends on __asm__() and thus __GNUC__.

Clarify documentation.

Update #4953.
2023-09-13 07:45:35 +02:00
Chris Johns
b9f11607b1 libdl: Realloc text memory if there are trampolines
- Add resize to the allocator interface

- Rework the trampoline variables in the obj struct
  to make better sense of what is happening

Closes #4944
2023-08-27 07:31:49 +10:00
Chris Johns
27da374e48 libdl: Add support to import base image TLS symbols
This change requires an rtems-tools update for symbol generation.

Working architectures:
 - aarch64
 - arm
 - powerpc
 - sparc

No newlib TLS support but checked:
 - i386
 - m69k

Updates #4920
2023-08-21 11:16:17 +10:00
Joel Sherrill
fd693085ea Add the Regulator Interface and test
Updates #4924.

The Regulator is an application support class which is used to
deal with the scenario where there is a bursty input source
which needs to be metered out to a destination sink. The maximum
size of bursts needs to be known and the delivery method must
be configured to deliver messages at a rate that allows the
traffic to not overflow.
2023-08-11 13:44:47 -05:00
Sebastian Huber
6293fc4fd5 score: Assert scheduler index validity
Update #4844.
2023-07-28 17:13:14 +02:00
Sebastian Huber
64d9fc6e01 doxygen: Fix group memberships in libtest 2023-07-28 12:25:01 +02:00
Sebastian Huber
3ba43da922 score: Move <rtems/score/gcov.h>
Move <rtems/score/gcov.h> to <rtems/test-gcov.h>.  These functions do
not belong to an super core service.
2023-07-28 11:58:32 +02:00
Sebastian Huber
527af2b7f2 score: Move formatted I/O functions
These functions do not belong to an super core service.
2023-07-28 11:58:32 +02:00
Gedare Bloom
c1cad595af Revert "cpukit/dev/can: Added CAN support"
This reverts commit cd91b37dce.

Closes #4803.
2023-07-27 12:41:28 -06:00
Sebastian Huber
1bc5d3e481 sys: Add files to Doxygen group
Canonicalize brief descriptions.

Update #3707.
2023-07-26 07:18:29 +02:00
Sebastian Huber
ec1e500f4f timecounter: Add files to Doxygen group
Update #3707.
2023-07-26 07:18:29 +02:00
Sebastian Huber
d3fe128d67 posix: Add files to Doxygen group
Canonicalize brief descriptions.

Update #3707.
2023-07-26 07:18:29 +02:00
Sebastian Huber
58840ffbb0 rtems: Add files to Doxygen groups
Provide basic Doxygen comments.

Update #3706.
Update #3707.
2023-07-26 07:18:29 +02:00
Sebastian Huber
f99f5cec85 libtest: Place files into a Doxygen group
Canonicalize the file headers.

Update #3707.
2023-07-26 07:18:29 +02:00
Sebastian Huber
0e70e989e6 rtems: Improve task entry wording 2023-07-25 07:26:01 +02:00
Sebastian Huber
c8cae1d82d score: Move _IO_Relax() to new <rtems/dev/io.h>
This function is not a super core service.
2023-07-24 17:51:48 +02:00
Sebastian Huber
49356594d3 rtems: Fix typo
Update #4772.
2023-07-20 15:05:33 +02:00
Kinsey Moore
21429f681d rtems: Update references to rtems_task_wake_after
rtems_task_wake_after takes a parameter in terms of a count of clock
ticks and not a measure in a subunit of seconds. This updates
documentation to reflect that. This also makes obvious the caveat about
the first tick wait not being a whole tick and points the user at a
replacement for better accuracy.

Updates #4772
2023-07-20 11:31:25 +02:00
Joel Sherrill
6264b14804 Revert accidentally committed "Remove unused _IO_Relax"
Sebastian has agreed to move this out of score. I should have
removed this patch from my tree but accidentally committed it
with another patch.
2023-07-03 10:32:53 -05:00
Joel Sherrill
e49e8daf3d Remove unused _IO_Relax
The only use was in a test.
2023-07-03 10:11:58 -05:00
Sebastian Huber
83305f5050 pci: Do not use BSP-specific interrupt API
Update #3269.
2023-06-16 06:35:22 +02:00
Sebastian Huber
a799809213 score: Remove CPU port atomic operations API
Use the C/C++ standard API directly.
2023-06-12 07:46:23 +02:00