Commit Graph

33985 Commits

Author SHA1 Message Date
Chris Johns
53abbbd08d powerpc/shared: Fix warnings 2021-02-16 08:12:43 +11:00
Chris Johns
86f031d401 powerpc/motorola_powerpc: Fix tm27 warnings 2021-02-16 08:12:43 +11:00
Chris Johns
b5aef78b36 score: Fix warning in thread queue ops 2021-02-16 08:12:43 +11:00
Chris Johns
e1676c1a0d Update motorola_power to irq-generic interrupt management
- Add support to the BSP to enable irq-generic management

- Update the powerpc shared irq code to support irq-generic. This
  is an opt in option for existing powerpc bsps. This change
  should be simpler now

- Fix a number of issues in ISA IRQ controller handling by porting
  fixes from the i386 (PC) BSP

Closes #4238
Closes #4239
2021-02-13 13:26:07 +11:00
Ryan Long
f65d3384dd rtems-debugger-threads.c: Fix three Dereference before null check errors
CID 1468681: Dereference before null check in rtems_debugger_thread_continue().
CID 1468690: Dereference before null check in rtems_debugger_thread_system_resume().
CID 1468694: Dereference before null check in rtems_debugger_thread_find_index().

Closes #4241.
2021-02-12 17:13:19 -06:00
Ryan Long
3f4cdd8589 rtems-debugger-target.c: Fix Dereference before null check (CID #1468682)
CID 1468682: swbreaks is assigned a value dereferenced from target before
it has been verified that target is not null.

Closes #4240.
2021-02-12 17:13:16 -06:00
Ryan Long
14f5a0597a consolesimpletask.c: Fix Two Unchecked Return Values (CID #1437625 and #1472765)
CID 1437625: Unchecked return value from call to rtems_task_create().
CID 1472765: Unchecked return value from call to rtems_task_start().

Closes #4237.
2021-02-12 17:13:13 -06:00
Ryan Long
cc273ec10f Add macros to assert status and use it
These macros are to be used to check the status from calls that are flagged
by Coverity as 'Unchecked return value'.

Fix file assert.h
2021-02-12 17:13:10 -06:00
Chris Johns
426154f4fd cputkit/rtems: Remove warning 2021-02-13 07:09:38 +11:00
Chris Johns
03dff2019f libcsupport: Add sbrk greedy support to consume all sbrk memory
- Move the heap sbrk code into a separate routnine.

- Update heap and workspace greedy allocators to use the common
  sbrk greedy support.

Closes #3982
2021-02-10 17:28:32 +11:00
Sebastian Huber
570992dc27 bsp/riscv: Re-license to BSD-2-Clause
Change license to BSD-2-Clause according to file history.

Update #3053.
2021-02-09 08:18:58 +01:00
Sebastian Huber
286ff5868e basedefs: Add stringification of argument lists
Change RTEMS_STRING() and RTEMS_XSTRING() to accept a variable number of
arguments which is stringified.  This can be used for example to create
register lists for inline assembler statements.
2021-02-09 07:06:49 +01:00
G S Niteesh Babu
8b32f1d8c4 bsps/shared/ofw: Bug fixes
Fixed bugs in rtems_ofw_get_prop, rtems_ofw_get_prop_len
and removed hardcoded value.
2021-02-08 21:08:36 +01:00
G S Niteesh Babu
6da50db55b bsps/shared/ofw: Make rtems_ofw_get_effective_phandle iterative
Refactored recursive rtems_ofw_get_effective_phandle into a
iterative function.
2021-02-08 21:08:36 +01:00
G S Niteesh Babu
066687c43a bsps/shared/ofw: Use strlcpy instead of strncpy
Changed rtems_ofw_get_prop to use strlcpy instead of strncpy
to ensure the buffer is null terminated incase of overflow.
2021-02-08 21:08:36 +01:00
G S Niteesh Babu
c4985b7718 bsps/shared/ofw: Fix coverity reported defects
Fixed use after free and null pointer dereference defects

FIXES:
1) CID 1472601 (NULL_RETURNS)
2) CID 1472600 (USE_AFTER_FREE)
3) CID 1472599 (USE_AFTER_FREE)
4) CID 1472598 (USE_AFTER_FREE)
5) CID 1472596 (USE_AFTER_FREE)

The below two defects have to marked false positive
1) CID 1472597 (ARRAY_VS_SINGLETON)
2) CID 1472595 (ARRAY_VS_SINGLETON)
2021-02-08 21:08:36 +01:00
Sebastian Huber
fafc923044 validation: Tweak construct error tests
Unify the state names across tests and make sure the state names have a
similar length.
2021-02-08 08:44:14 +01:00
Sebastian Huber
e59efd8835 validation: Tests for barrier manager 2021-02-08 08:44:14 +01:00
Sebastian Huber
788fa865fb libtest: Add T_get_thread_timer_state() 2021-02-08 08:44:14 +01:00
Sebastian Huber
c9ceff92c3 validation: Add tests for rtems_build_name() 2021-02-08 07:52:42 +01:00
Chris Johns
7ca3b283ba libcsupport: Have greedy allocations use consume extended memory
- Call the heap extend handler until all memory has been
  requested.

Closes #3982
2021-02-08 17:45:52 +11:00
Chris Johns
822cad8967 libcsupport: Add no_regular_file_mknod as a mount option to the mount table
- Add the bool flag no_regular_file_mknod to the mount table so a file
  system can indicate creating regular files is not done by
  use the mknod handler. The file system will handle creating a
  file node in the open handler.

- Note, the mount option is an enum which means there is only one
  exclusive option supported. As a result no encapsulation is
  provided and file systems need to set no_regular_file_mknod directly.

Closes #4222
2021-02-08 13:10:37 +11:00
Chris Johns
ee14fdfe19 bsp/motorola_powerp: Print RTEMS_VERSION from the bootloader 2021-02-08 10:12:21 +11:00
Chris Johns
450e238bc6 powerpc/shared: ISA bus bridge fails to enable the openpic irq
- The call to enable the openpic irq for the ISA bridge fails
  because the IRQ used is offset by the ISA bus signals and
  the openpic call expects an IRQ relative to its signals.

- Add the MVME 2600/2700 to the list of boards with an ISA bridge.

Closes #4231
2021-02-08 10:11:13 +11:00
Sebastian Huber
96ea09ac4c score: Add barrier thread queue operations
This fixes a missing decrement of the number of waiting threads during a
barrier wait timeout.

Close #4230.
2021-02-06 20:55:51 +01:00
Sebastian Huber
9477d9aedb score: Make FIFO thread queue ops public
Update #4230.
2021-02-06 20:55:51 +01:00
Sebastian Huber
2b5ce23b99 score: Constify Thread_queue_First_operation
Update #4230.
2021-02-06 20:42:26 +01:00
Sebastian Huber
aa0060f4c1 rtems: Clarify partition manager documentation
Unify the wording across similar directives of other managers.  Add
"Constraints" paragraph.

Update #3993.
2021-02-03 06:10:21 +01:00
Sebastian Huber
98549e4524 score: _Objects_Build_name() signed/unsigned char
Change _Objects_Build_name() so that the result is independent of the
signedness of char.

Close #4228.
2021-02-03 05:58:49 +01:00
Sebastian Huber
ca68cfc898 rtems: Avoid duplicated implemenation
Use the rtems_clock_get_ticks_per_second() macro to implement the
rtems_clock_get_ticks_per_second() function.
2021-02-03 05:57:06 +01:00
Sebastian Huber
8a95e6f820 rtems: Rework object services API
Add a "Constraints" paragraph to the documentation.

Provide prototypes for programming language bindings.  Use the macro
implementation to implement the corresponding functions.

Update #3993.
2021-02-03 05:57:06 +01:00
Sebastian Huber
490e6e8809 score: Define _Assert() for static analysis runs
The goal is to reduce false positive NULL_RETURNS,
PW.NORETURN_FUNCTION_DOES_RETURN, PW.SET_BUT_NOT_USED,
UNUSED_VALUE, etc. issues produced by Coverity.

Define RTEMS_STATIC_ANALYSIS if a static analysis run by Coverity is
performed.
2021-02-01 14:19:28 +01:00
Sebastian Huber
8f7baef4a6 libtest: Remove double definition 2021-02-01 14:19:28 +01:00
Sebastian Huber
56494ed8d1 score: Clarify thread life state documentation 2021-02-01 12:48:10 +01:00
Sebastian Huber
05da65c297 score: Document Thread_Life_state 2021-02-01 10:15:57 +01:00
Sebastian Huber
51e59d59b7 nios2: Allow ISR nesting in dispatch variant
Rename _Nios2_ISR_Dispatch_with_shadow_non_preemptive() in
_Nios2_ISR_Dispatch_with_shadow_register_set().  Remove
_Nios2_ISR_Dispatch_with_shadow_preemptive().
2021-02-01 06:26:18 +01:00
Sebastian Huber
19acb3bc17 nios2: Optimize ISR dispatch variant
Use _Thread_Do_dispatch() in
_Nios2_ISR_Dispatch_with_shadow_non_preemptive().
2021-02-01 06:26:18 +01:00
Sebastian Huber
9165349d39 nios2: Use Per_CPU_Control::isr_dispatch_disable 2021-02-01 06:26:18 +01:00
Sebastian Huber
c968b27fbd nios2: Add TLS support
Update #4214.
2021-02-01 06:26:18 +01:00
Sebastian Huber
e324f8270f nios2: Make _ISR_Is_in_progress() weak
This allows the BSP to override this function.
2021-02-01 06:26:18 +01:00
Sebastian Huber
98c95d15e5 nios2: Fix ISR dispatch variants
The thread dispatch disabled level moved to _Per_CPU_Information some
time ago.
2021-02-01 06:26:18 +01:00
Sebastian Huber
9523887904 rtems: Fix implicit type conversions
This fix relates to a Coverity issue (PW.MIXED_ENUM_TYPE).
2021-02-01 06:26:18 +01:00
Sebastian Huber
fe08e454c6 score: Remove unused _SMP_Assert() 2021-02-01 06:26:18 +01:00
Sebastian Huber
9e56c85033 score: Fix implicit type conversion
This fix relates to a Coverity issue (PW.MIXED_ENUM_TYPE).
2021-02-01 06:26:16 +01:00
Sebastian Huber
d52c49611c rtems: Fix explicit type conversion
This fix relates to a Coverity issue (PW.MIXED_ENUM_TYPE).
2021-02-01 06:26:13 +01:00
Sebastian Huber
23f4e5b6c9 libtest: Fix implicit type conversions
This fix relates to a Coverity issue (PW.MIXED_ENUM_TYPE).
2021-02-01 06:22:20 +01:00
Sebastian Huber
c4db00db23 rtems: Mark value as used
This fix relates to a Coverity issue (UNUSED_VALUE).
2021-02-01 06:22:20 +01:00
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