Commit Graph

34138 Commits

Author SHA1 Message Date
Sebastian Huber
0c992065b8 score: Remove double assignment
This fix relates to a Coverity issue (UNUSED_VALUE).
2021-02-01 06:22:20 +01:00
Sebastian Huber
3b8137b094 libtest: Check return values with RTEMS_DEBUG
This fix relates to a Coverity issue (UNINIT).
2021-02-01 06:22:20 +01:00
Sebastian Huber
8d099f4ab4 score: Remove superfluous type qualifier
This fix relates to a Coverity issue
(PW.USELESS_TYPE_QUALIFIER_ON_RETURN_TYPE).
2021-02-01 06:22:20 +01:00
Sebastian Huber
2c0506330f score: Simplify _CORE_message_queue_Broadcast()
This fix relates to a Coverity issue (PW.SET_BUT_NOT_USED).
2021-02-01 06:22:20 +01:00
Sebastian Huber
ab97ea6443 bsp/leon3: Improve printk() support
Use the idle stack to buffer early uses of printk().  Print the buffered
characters during initialization when the UART is available and before
the idle stack is used normally.

This fix relates to a Coverity issue (PW.SET_BUT_NOT_USED).
2021-02-01 06:22:20 +01:00
Sebastian Huber
3dcdb9c9e3 score: Simplify _MRSP_Wait_for_ownership()
Do not shadow the queue_context parameter with a local variable.  Reuse
the queue context to reduce the required stack space.

This fix relates to a Coverity issue (PW.PARAMETER_HIDDEN).
2021-02-01 06:22:20 +01:00
Sebastian Huber
5dc4f9c7f4 score: Fix implicit type conversion
This fix relates to a Coverity issue (PW.MIXED_ENUM_TYPE).
2021-02-01 06:22:20 +01:00
Sebastian Huber
c44ab8984e bsp/leon3: Fix incompatible function types
This fix relates to a Coverity issue (PW.INCOMPATIBLE_PARAM).
2021-02-01 06:22:20 +01:00
Sebastian Huber
198e92635c kern_tc.c: Remove unused code
This fix relates to a Coverity issue (PW.DECLARED_BUT_NOT_REFERENCED).
2021-02-01 06:22:20 +01:00
Sebastian Huber
450c170536 score: Add comments and asserts for clarification
This fix relates to a Coverity issue (NULL_RETURNS).
2021-02-01 06:22:20 +01:00
Sebastian Huber
64189a7076 score: Fix _CORE_message_queue_Submit() indentation
This fix relates to a Coverity issue (NESTING_INDENT_MISMATCH).
2021-02-01 06:22:20 +01:00
Sebastian Huber
dc2a69871d bsp/leon3: Fix bsp_fatal_extension) indentation
Remove superfluous include.  Fix comment formatting.

This fix relates to a Coverity issue (NESTING_INDENT_MISMATCH).
2021-02-01 06:22:20 +01:00
Sebastian Huber
395c15f655 score: Fix _Objects_Get_information() indentation
This fix relates to a Coverity issue (NESTING_INDENT_MISMATCH).
2021-02-01 06:22:20 +01:00
Sebastian Huber
bf8d4b9479 score: Add _Thread_Get_objects_information()
We do not need all the checks if we have a valid indentifier to a thread
class object.

Using the new _Thread_Get_objects_information() instead of the inline
function _Thread_Get_objects_information_by_id() avoids dead code since
the identifier in a thread control is always valid and the return NULL
path in _Thread_Get_objects_information_by_id() would be dead code.  The
_Thread_Get_objects_information_by_id() should be an inline function
since it is used by _Thread_Get() and thus performance critical.  Static
analyzers which cannot derive that the identifier in a thread control is
always valid, may find a potential NULL pointer access (or otherwise
find dead code).

The identifier in an object control is always valid, see
_Objects_Initialize_information() and _Objects_Extend_information().

Move _RTEMS_tasks_Free() to the only source file which calls this
function.
2021-02-01 06:22:19 +01:00
Sebastian Huber
76eec484e5 score: Rename _Thread_Get_objects_information()
Rename _Thread_Get_objects_information() in
_Thread_Get_objects_information_by_id() to emphasize that this thread
method uses an object identifier and not a thread control.
2021-02-01 06:22:19 +01:00
Sebastian Huber
44ae183090 bsps/aarch64: Add missing include
Fixes:

bsps/shared/dev/irq/arm-gicv2.c:53:6: warning: no previous prototype for
'bsp_interrupt_dispatch' [-Wmissing-prototypes]

Close #4227.
2021-01-28 19:28:39 +01:00
Sebastian Huber
f8b6359415 bsp/leon3: Simplify bsp_interrupt_is_valid_vector()
There is not need to check that vector >= BSP_INTERRUPT_VECTOR_MIN since
BSP_INTERRUPT_VECTOR_MIN is zero and vector is unsigned.

This fix relates to CID 1399742 (NO_EFFECT).
2021-01-28 11:12:43 +01:00
Sebastian Huber
fcbefb5ee6 rtems: Use _Status_Get()
This fixes implicit conversions between different enum types.
2021-01-28 09:58:03 +01:00
Sebastian Huber
b361eabd93 bsps: Replace bsp_specs with an empty file
This fixes an issue with the latest tool chain which adds the default
linker script in the endfile specification.

Update #3250.
2021-01-28 06:28:33 +01:00
Sebastian Huber
e269e389ea libtest: Remove superfluous NULL pointer check
This fix relates to CID 1468683 (REVERSE_INULL).
2021-01-27 19:08:29 +01:00
Sebastian Huber
426b6cdba9 libtest: Use dependency injection
This helps static analyzers.
2021-01-27 19:08:29 +01:00
Sebastian Huber
361ec32070 cacheimpl.h: Avoid potential dead code
If CPU_DATA_CACHE_ALIGNMENT == CPU_INSTRUCTION_CACHE_ALIGNMENT we had
dead code with the previous implementation.

This fix relates to CID 1399776 (DEADCODE).
2021-01-27 19:02:03 +01:00
Sebastian Huber
3272dcb364 Update copyright notice to 2021 2021-01-27 09:41:07 +01:00
Sebastian Huber
b35ac9901c rtems: Add "Notes" paragraph header
Place the paragraphs in the same order as the directive documentation in
the RTEMS Classic API Guide.

Update #3993.
2021-01-27 06:01:48 +01:00
Sebastian Huber
30c71c3a69 heap: Fix _Heap_Area_overhead()
The first block must be a proper block.  Account for this in
_Heap_Area_overhead().
2021-01-26 15:29:36 +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
9d2db27adf build: Add CPPFLAGS to assembler command line
We use GCC to call the assembler.  This means the assembler files are
processed by the C preprocessor.
2021-01-26 15:29:36 +01:00
Sebastian Huber
9eb9813dc1 bsps: Add missing DWARF 5 sections
Sort alphabetically.
2021-01-26 15:29:36 +01:00
Sebastian Huber
40c4e2ecc3 build: Add test excludes 2021-01-26 07:17:50 +01:00
Sebastian Huber
33c12d5f92 bsps: Support DWARF 5 sections
GCC 11 uses DWARF 5 by default.
2021-01-25 12:56:00 +01:00
Sebastian Huber
a6689fb147 Improve file header comment in generated files 2021-01-25 06:49:27 +01:00
Sebastian Huber
c709017efb Fix RTEMS_LINKER_ROSET_ITEM_ORDERED_DECLARE()
Add "extern" similar to RTEMS_LINKER_RWSET_ITEM_ORDERED_DECLARE().

Close #4221.
2021-01-25 06:44:37 +01:00
Sebastian Huber
70c34fb58c splinkersets01: Fix declaration
GCC 11 produced warnings like this:

items.c:21:1: warning: ignoring attribute
'section (".rtemsrwset.test_rw.content.0.1")' because it conflicts with
previous 'section (".rtemsrwset.test_rw.content.1")' [-Wattributes]

items.c:23:1: warning: ignoring attribute
'section (".rtemsroset.test_ro.content.0.OC")' because it conflicts with
previous 'section (".rtemsroset.test_ro.content.1")' [-Wattributes]
2021-01-23 20:03:56 +01:00
Christian Mauderer
c45da42b7a bsps/shared: Build fsl-edma only for certain BSP
Move the Freescale EDMA driver to it's own object and build it only for
the BSP that is currently using it.
2021-01-22 15:51:14 +01:00
Christian Mauderer
7b99d7619e bsp/imx: Fix system counter init for imx6
For i.MX7 U-Boot initializes the system counter. On i.MX6 Barebox is
often used which doesn't initialize the counter. With this patch, we try
to auto-detect whether the counter is initialized or not and do the
initialization ourself if necessary.

Closes #3869
2021-01-21 10:17:31 +01:00
Christian Mauderer
36b4e8c394 bsps/imxrt: Add ioctl to LPSPI to get registers
This allows an application to get the registers of the LPSPI. That is
usefull for applications that want to use DMA for a very specialized and
highly optimized communication.

Update #4180
2021-01-21 10:17:31 +01:00
Christian Mauderer
b2f265ab9f cpukit/spi: Allow driver specific ioctl
This allows a SPI driver to add a hardware specific ioctl.
2021-01-21 10:17:31 +01:00
Christian Mauderer
d9794a1f97 bsps/imxrt: Add DMA numbers to dtsi
Also currently no driver uses these numbers, it is usefull for
applications that want to use the DMA.

Update #4180
2021-01-21 10:17:31 +01:00
Christian Mauderer
a434cc80cb bsps/shared: Adapt fsl-edma driver for imxrt
Note: The changes have been done with portability in mind. The driver
should (in theory) be able to replace the original one in the MPC BSPs
too. For full compatibility an adaption layer and especially a test
would be necessary. Because both are missing, don't integrate it into
the MPC BSP now.

Update #4180
2021-01-21 10:17:31 +01:00
Christian Mauderer
301bbc3a4d bsps/shared: Copy fsl-edma from mpc55xx
This is a preparation for making the driver universal.

Update #4180
2021-01-21 10:17:31 +01:00
Christian Mauderer
22e9dafb74 bsps/imxrt: Use standard names to avoid warnings
If spi or i2c slaves are "connected" to the spi or i2c bus, the device
tree compiler complains if the busses are not named spi or i2c.

Update #4180
2021-01-21 10:17:31 +01:00
Sebastian Huber
8ee22b2975 mrsp: Change error status for a nested seize
Return STATUS_DEADLOCK (RTEMS_INCORRECT_STATE) to indicate a nested
seize since this is a kind of deadlock.  This status code is also used
for other deadlocks.

Update #4217.
2021-01-21 10:10:34 +01:00
Kinsey Moore
7c30dca2b5 bsps/aarch64: Swap primary ZynqMP UART
Both Qemu and actual hardware treat the second UART in memory map as the
primary UART. This adjusts the ZynqMP BSPs to match.
2021-01-14 13:32:06 -06:00
Chris Johns
7696533b97 cpukit: Merge FreeBSD values for the priorities
It seems we need valid values or assumptions in the FreeBSD about
these values breaks some of the code.

Closes #4207
2021-01-08 09:51:48 +11:00
Sebastian Huber
6600585fc8 bsp/stm32h7: Split console configuration
This allows applications to individually provide configuration
structures.

Update #4209.
2021-01-04 19:23:15 +01:00
Sebastian Huber
affc8de85f bsp/stm32h7: Split start configuration
This allows applications to individually provide configuration
structures.

Update #4209.
2021-01-04 19:22:53 +01:00
G S Niteesh Babu
f867e7b6f4 libtests/ofw01: Added a test for RTEMS OFW
This commit adds a basic test that tests all the implemented
RTEMS OFW functions.
2020-12-27 10:05:09 +01:00
G S Niteesh Babu
9d2ed41fcb bsps/shared/ofw: Implement RTEMS OFW interface
RTEMS OFW is a FDT only implementation of the OpenFirmWare
interface. This API is created to be compatible with FreeBSD
OpenFirmWare interface. The main intention is to make
porting of FreeBSD drivers to RTEMS easier.

Most functions implemented have an direct one-one mapping
with the original OFW API and some extra auxiliary functions
were implemented to make working with device trees easier in
RTEMS.

Update #3784
2020-12-27 10:05:02 +01:00
Sebastian Huber
828ea6ee86 Update header.am 2020-12-23 10:25:33 +01:00
Sebastian Huber
81c7f5be92 arm/fvp: New BSP
This BSP supports the Arm Fixed Virtual Platform.  Only the Cortex-R52
processor configuration is supported by the BSP.  It should be easy to
add support for other variants if needed.

Update #4202.
2020-12-23 09:24:49 +01:00