Commit Graph

34670 Commits

Author SHA1 Message Date
Kinsey Moore
3fc641abca testsuite: Add machine exception resume test
Add a test to verify that intercepted exceptions can be resolved and
execution can be resumed.
2021-10-29 12:40:56 -05:00
Kinsey Moore
02377c8b8f cpukit/aarch64: Add exception extensions support
This adds the function implementations necessary to add exception
extensions support to AArch64.
2021-10-29 12:40:56 -05:00
Kinsey Moore
db9e88510d cpukit: Add exception extensions
This adds the set of functions necessary to allow more generic handling
of machine exceptions. This initial patch offers the ability to
manipulate a CPU_Exception_frame and resume execution using that
exception information with or without thread dispatch. These functions
are gated behind the RTEMS_EXCEPTION_EXTENSIONS configuration option.
2021-10-29 12:40:56 -05:00
Stephen Clark
9b088157ed rtems-debugger: Fixed pointer types to work on 32 and 64 bit architectures
Using 32bit types like uint32_t for pointers creates issues on 64 bit
architectures like AArch64. Replaced occurrences of these with
uintptr_t, which will work for both 32 and 64 bit architectures. Added
hex_decode_addr function to rtems-debugger.
2021-10-27 13:25:30 -05:00
Sebastian Huber
75c133bda0 sptests/sp69: Remove test case
This error condition no longer exists.

Update #4528.
2021-10-25 18:04:28 +02:00
Sebastian Huber
6c3976e2fe score: Move code block to separate function
Move a code block to the new function _Thread_Scheduler_withdraw_nodes()
to ease code review.
2021-10-25 09:24:52 +02:00
Sebastian Huber
940b9b1881 score: Do not shadow lock_context local variable 2021-10-25 09:24:51 +02:00
Sebastian Huber
24922d0f54 rtems: rtems_rate_monotonic_get_status()
Mention that resetting the processor usage time of tasks has no impact
on the period status and statistics.

Remove no longer relevant RTEMS_NOT_DEFINED error status.

Update #4528.
2021-10-25 08:16:09 +02:00
Sebastian Huber
f1723d1293 rtems: Regenerate for IDLE task allocator option
Update #4524.
2021-10-25 08:02:45 +02:00
Sebastian Huber
28632b558c score: Fix typo 2021-10-25 08:01:02 +02:00
Sebastian Huber
0221da5f56 rtems: Fix rate monotonic statistics
The rate monotonic period statistics were affected by
rtems_cpu_usage_reset().  The logic to detect and work around a CPU
usage reset was broken.

The Thread_Contol::cpu_time_used is changed to contain the processor
time used throughout the entire lifetime of the thread.  The new member
Thread_Contol::cpu_time_used_at_last_reset is added to contain the
processor time used at the time of the last reset through
rtems_cpu_usage_reset().  This decouples the resets of the CPU usage and
the rate monotonic period statistics.

Update #4528.
2021-10-25 08:01:02 +02:00
Sebastian Huber
9be97a34db score: Optimize default idle task stack allocator
Update #4524.
2021-10-25 08:01:02 +02:00
Sebastian Huber
a4112bd8af score: Simplify _Watchdog_Next_first() 2021-10-25 08:01:02 +02:00
Chris Johns
3f0ad2b3b7 spec/libdebugger: Only enable for supported architectures
Closes #4533
2021-10-22 10:34:24 +11:00
Kinsey Moore
087e4ec973 spec/aarch64: Enable previously unbuildable tests
The spconfig01 and spmisc01 tests were disabled for all AArch64 BSPs due
to a toolchain issue preventing them from compiling correctly. The
binutils version that contains the fix has been released and integrated
into RSB such that these two tests now build and operate correctly.
2021-10-20 09:32:12 -05:00
Alex White
d03776e804 microblaze: Rework for RTEMS 6
This reworks the existing MicroBlaze architecture port and BSP to
achieve basic functionality using the latest RTEMS APIs.
2021-10-13 14:45:37 -05:00
Hesham ALMatary
0f62af0ef8 bsps: Add MicroBlaze FPGA BSP 2021-10-13 14:45:37 -05:00
Joel Sherrill
edf8b49ee5 score: Add MicroBlaze port 2021-10-13 14:45:37 -05:00
Joel Sherrill
822ebb4cae Add support for IDLE Thread stack allocator
Add a stack allocator hook specifically for allocation of IDLE thread stacks.
This allows the user to decide if IDLE thread stacks are statically allocated
or handled by the same custom allocator mechanism as other thread stacks.

Closes #4524.
2021-10-11 08:42:25 -05:00
Sebastian Huber
d61fbeda59 score: _Thread_queue_Surrender_priority_ceiling()
Do not use a direct thread dispatch in
_Thread_queue_Surrender_priority_ceiling() since it may be used in condition
variables using POSIX mutexes.

Close #4526.
2021-10-11 13:22:12 +02:00
Joel Sherrill
f6385b4edc libdl/rtl-mdreloc-h8300.c: Remove remnant of h8300 port
Updates #2452.
2021-10-08 10:44:44 -05:00
Sebastian Huber
3bb97a30b1 score: Always check queue in _Thread_Wait_cancel()
Commit 18c8a270c2 removed
_Thread_queue_Do_nothing_extract() so we have to check for a non-NULL
queue in all configurations.
2021-10-06 10:41:14 +02:00
Christian Mauderer
1fc3f17127 bsp/imx: Add cs_change support to SPI 2021-10-06 10:24:03 +02:00
Sebastian Huber
38c2147759 rtems: Set postponed jobs in rate-monotonic cancel
Set the postponed jobs count to zero in rtems_rate_monotonic_cancel() so that
rtems_rate_monotonic_get_status() returns a consistent status for inactive
periods.

Update #4511.
2021-10-06 08:46:21 +02:00
Sebastian Huber
226d0e9218 score: Optimize EDF SMP scheduler ops
The schedule operation is only called by rtems_task_mode().  It is
called if preempt mode of the executing thread changes from disabled to
enabled.  Since the EDF SMP scheduler does not support the disabled
preemption mode, the schedule operation is never called.
2021-10-06 08:37:50 +02:00
Sebastian Huber
344bb536a4 rtems: Generate <rtems/cpuuse.h>
Write the documentation from scratch.
2021-10-06 08:37:50 +02:00
Sebastian Huber
e9063644ae posix: Remove "RTEMS" from POSIX API group
Clarify group description.

Update #3706.
2021-10-06 08:37:50 +02:00
Sebastian Huber
8b762a88c1 scoe: Move workspace group definition
Define the group in the header file which is used by <rtems/confdefs.h>.

Update #3706.
2021-10-06 08:37:50 +02:00
Sebastian Huber
5a6f94da45 rtems: Add ASR implementation to existing group
Update #3706.
2021-10-06 08:37:50 +02:00
Sebastian Huber
a950c1355b score: Add Hash Handler to group
Update #3706.
2021-10-06 08:37:49 +02:00
Sebastian Huber
4c0b006fc0 rtems: Canonicalize Doxygen in <rtems/counter.h>
Update #3706.
2021-10-06 08:37:49 +02:00
Sebastian Huber
dba2e690bb rtems: Canonicalize Doxygen in <rtems/seterr.h>
Update #3706.
2021-10-06 08:37:49 +02:00
Zacchaeus Leung
4a5a41459a improve the format error reporting on i386 2021-10-04 17:33:18 -05:00
Alex White
772ffc0704 testsuites/fstests: Fix uninitialized utimbuf structs
The utimbuf structs in fsimfsconfig01 and fsimfsconfig02 were
being passed to utime uninitialized. This did not cause problems until
utime was changed to use utimensat behind the scenes. Now that
utimensat is called, the values of the utimbuf struct are checked, and
EINVAL is set for invalid values. The utimebuf structs in these tests
could contain invalid values since they are uninitialized.

By zero-initializing the utimbuf structs, we ensure that they pass the
checks in utimensat and that errno is set to the expected ENOTSUP.
2021-10-04 17:18:13 -05:00
Kinsey Moore
9c2cb68481 cpukit/aarch64: Use correct interrupt level types
All other architectures use uint32_t for interrupt levels and there is
no reason not to do so on AArch64.
2021-10-01 14:03:26 -05:00
Kinsey Moore
ccd1c5e560 cpukit/aarch64: Use correct context register sets
Context validation for AArch64 was ported from the ARM implementation
without a reinterpretation of the actual requirements. The spcontext01
test just happened to pass because the set of scratch registers in ARM
is a subset of the scratch registers in AArch64.
2021-10-01 12:52:41 -05:00
Sebastian Huber
61ef22bbeb score: Add Thread_queue_Deadlock_status
Replace the boolen return value with the new enum
Thread_queue_Deadlock_status.  This improves the code readability.
Improve documentation.  Shorten function names.
2021-10-01 13:19:38 +02:00
Sebastian Huber
82e2216713 score: Avoid dead code in thread queue surrender
For uniprocessor configurations, this patch removes dead code in the
_Thread_queue_Surrender() and _Thread_queue_Surrender_priority_ceiling()
functions.

Dead code is removed from _Thread_queue_Surrender_sticky().
2021-10-01 13:18:16 +02:00
Sebastian Huber
18c8a270c2 score: Remove _Thread_queue_Do_nothing_extract()
This function was unused.  It was a relict of the thread queue rework done
during the SMP support development.  In an early stage, the extract operation
was called with a NULL thread queue.  However, this is no longer the case.  The
extract operation is only called if we have a non-NULL thread queue.
2021-09-30 13:48:31 +02:00
Sebastian Huber
25f126e1c9 score: Regenerate <rtems/score/basedefs.h>
Reflect renamed specification item.
2021-09-30 07:31:58 +02:00
Sebastian Huber
99d5373b83 score: Add Doxygen group for <sys/lock.h> mutexes 2021-09-30 07:31:58 +02:00
Sebastian Huber
dde74af944 rtems: Adjust parameter names
Adjust parameter names to match with the declaration.  This avoid using
a name reserved by the C standard: "time".

Close #4035.
2021-09-30 07:29:57 +02:00
Sebastian Huber
abda5595f8 rtems: Justify integer conversions
Close #2548.
2021-09-30 07:29:57 +02:00
Sebastian Huber
3fe07115a0 score: Improve variable names in thread init 2021-09-22 18:31:46 +02:00
Sebastian Huber
c2f2404840 score: Simplify _Thread_Try_initialize()
Move a code block to its own new function
_Thread_Initialize_scheduler_and_wait_nodes().  Add comments.
2021-09-22 18:31:46 +02:00
Kinsey Moore
5f652cb27e cpukit: Add AArch64 SMP Support
This adds SMP support for AArch64 in cpukit and for the ZynqMP BSPs.
2021-09-21 08:58:32 -05:00
Kinsey Moore
670a5089e2 bsps/gicv2: Allow BSPs to define IRQ attributes
ARM's GICv2 is configurable and its attributes vary between
implementations including omission of specific interrupts. This allows
BSPs to accomodate those varying implementations with customized
attribute sets.
2021-09-21 08:58:32 -05:00
Kinsey Moore
5ffc01fb97 bsps/zynqmp: Use correct number of interrupts
GICv2 can support up to 1024 interrupts, but ZynqMP hardware is only
configured for 192 interrupts.
2021-09-21 08:58:31 -05:00
Kinsey Moore
e3971de417 testsuites/smpmulticast01: Enforce step ordering
The order in which step checks for 1 and 2 are not rigidly defined and
may actually occur in either order depending on how the threads execute.
This waits for the job to complete to enforce the existing ordering.
2021-09-21 08:58:31 -05: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