Commit Graph

294 Commits

Author SHA1 Message Date
Sebastian Huber
3cf618b398 bsps/riscv: Support .riscv.attributes 2022-02-25 15:34:06 +01:00
Kinsey Moore
fa944c5eac spec/microblaze: Use configurable RAM size
When committed, the MicroBlaze RAM size was hard-coded to 16MB. This
changes the default to 256MB and sets the KCU105 BSPs to 2GB since that
is what the board has on it.
2022-02-23 12:33:55 -06:00
Kinsey Moore
3317d1e8f0 cpukit/libdebugger: Add MicroBlaze support
Add MicroBlaze support for libdebugger. This uses only software break
type instructions to provide self-hosted GDB debugging support for
applications since internal control of debug hardware is not possible.

Also of note, this implementation for MicroBlaze would typically use the
brki instruction for software break, but instead uses an illegal opcode
to manage software breaks as exceptions. This is due to poor interaction
with the debug hardware where the debug hardware will intercept software
breaks instead of allowing the software break vector to execute.
2022-02-23 08:35:45 -06:00
Sebastian Huber
8f1e8f8f26 kern_ntptime.c: Port to RTEMS
Remove previous adjtime() implementation.

Update #2348.
2022-02-21 14:16:41 +01:00
Kinsey Moore
ace9955fc4 cpukit/microblaze: Add exception extensions
Add the functions necessary to support RTEMS_EXCEPTION_EXTENSIONS and
mark this functionality as available on MicroBlaze.
2022-02-04 11:30:59 -06:00
Kinsey Moore
530a8c2494 cpukit/microblaze: Add debug vector and handler
This patch adds a vector for debug events along with a hook similar to
the exception framework. The debug vector generates an exception frame
for use by libdebugger.
2022-02-04 11:30:59 -06:00
Kinsey Moore
127980c799 cpukit/microblaze: Add exception framework
This patch updates the CPU_Exception_frame to include all necessary
registers, combines hardware snd software exception handlers into a
shared vector, provides an architecture-specific hook for taking
control of exception handling, and moves exception handling over to
actually using the CPU_Exception_frame instead of a minimal interrupt
stack frame. As the significant contents of _exception_handler.S have
been entirely rewritten, the copyright information on this file has been
updated to reflect that.
2022-02-04 11:30:59 -06:00
Alex White
37543e1968 microblaze: Add support for libbsd networking
This includes fixes and improvements necessary to get libbsd networking
running.
2022-02-01 16:58:24 -06:00
Jennifer Averett
50a6580da0 microblaze: Add support for libbsd. 2022-02-01 16:58:24 -06:00
Sebastian Huber
20ca3b09ba sparc: Mark dl06 as expected fail 2022-01-28 08:43:19 +01:00
Kinsey Moore
b539af865e cpukit: Prevent error with disabled stack checker
When the stack checker is not enabled, the stack checker reporting
function can still be called. This prevents that call from performing a
null memory access in trying to find the high water mark if the stack
checker was never initialized.

This also introduces a test to ensure this call does not cause a crash.

Closes #4588
2022-01-27 13:07:30 -06:00
Sebastian Huber
2145e0c7bf Remove obsolete rtems_gxx_*() implementation
GCC versions prior to 6.1 used a RTEMS thread model based on
rtems_gxx_*() functions. GCC version 6.1 or later uses the
self-contained synchronization objects of Newlib <sys/lock.h> for the
RTEMS thread model.

Remove the obsolete implementation.

Close #3143.
2022-01-27 11:06:46 +01:00
Sebastian Huber
4e530464b0 bsps: Default to CPU counter benchmark timer
Most BSPs which used the stubbed benachmark timer provide a CPU counter.
All BSPs provide at least a stub CPU counter.  Simply use the benchmark
timer implementation using the CPU counter.
2022-01-15 19:49:41 +01:00
Sebastian Huber
944c210b3d bsp/imx7: dl06 fails expectedly 2022-01-14 16:26:54 +01:00
Gedare Bloom
6c36cb7a48 aarch64: always boot into EL1NS
Always start the executive in Exception Level 1, Non-Secure mode.
If we boot in EL3 Secure with GICv3 then we have to initialize
the distributor and redistributor to set up G1NS interrupts
early in the boot sequence before stepping down from EL3S to EL1NS.

Now there is no need to distinguish between secure and non-secure
world execution after the primary core boots, so get rid of the
AARCH64_IS_NONSECURE configuration option.
2022-01-12 09:00:19 -07:00
Sebastian Huber
b982b8d44f build: Fix build item format 2022-01-11 16:18:11 +01:00
Sebastian Huber
18e47db518 bsp/mrm332: Fix TLS support in linker command file 2021-12-22 08:17:49 +01:00
Joel Sherrill
e92bc25453 Remove powerpc/haleakala board
Closes #4302.
2021-12-17 10:28:07 -06:00
Sebastian Huber
2d75d5db4f bsps/arm: Add missing Cache Manager source file 2021-12-13 07:32:58 +01:00
Kinsey Moore
0f5fa026ec spec: Update location of cadence I2C
When the cadence I2C code was moved to a shared directory, the
references were updated but the install locations weren't. This updates
the install locations to match what out-of-tree applications expect.
2021-12-09 08:35:49 -06:00
Sebastian Huber
4c20360d72 build: Move test header to right library item 2021-12-09 13:32:30 +01:00
Sebastian Huber
0d83bed2e5 rtems: Move scheduler directives to own header
Move all rtems_scheduler_* directives to the new header file
<rtems/rtems/scheduler.h>.  Add a Scheduler Manager API and
implementation group.
2021-12-02 14:09:51 +01:00
Sebastian Huber
d7205f0083 libc: Optimize malloc() initialization
The BSPs provide memory for the separate C Program Heap initialization
via _Memory_Get().  Most BSPs provide exactly one memory area.  Only two
BSPs provide more than one memory area (arm/altera-cyclone-v and
bsps/powerpc/mpc55xxevb).  Only if more than one memory area is
provided, there is a need to use _Heap_Extend().  Provide two
implementations to initialize the separate C Program Heap and let the
BSP select one of the implementations based on the number of provided
memory areas.  This gets rid of a dependency on _Heap_Extend().  It
also avoids dead code sections for most BSPs.

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

Update #3053.
2021-11-30 08:33:12 +01:00
Sebastian Huber
3d0620b607 score: Optimize Workspace Handler initialization
The BSPs provide memory for the workspace initialization via
_Memory_Get().  Most BSPs provide exactly one memory area.  Only two
BSPs provide more than one memory area (arm/altera-cyclone-v and
bsps/powerpc/mpc55xxevb).  Only if more than one memory area is
provided, there is a need to use _Heap_Extend().  Provide two
implementations to initialize the workspace handler and let the BSP
select one of the implementations based on the number of provided memory
areas.  This gets rid of a dependency on _Heap_Extend().  It also avoids
dead code sections for most BSPs.
2021-11-30 08:31:59 +01:00
Sebastian Huber
2de3a6e82c build: Use common objects item for get memory 2021-11-30 08:17:29 +01:00
Sebastian Huber
0bd28daef6 score: Split wkspace.c
Splitting the file avoids unnecessary link-time dependencies.
2021-11-30 08:17:29 +01:00
Joel Sherrill
dd70c81699 bsp_specs: Delete last remnants of these.
Updates #3937.
2021-11-29 08:50:03 -06:00
Sebastian Huber
61d0df45db build: Remove trailing white space 2021-11-29 08:58:22 +01:00
Sebastian Huber
2e56aabdb1 score: Move _Thread_queue_Extract()
Move _Thread_queue_Extract() since this function is not used by the core
services (threads, semaphores, mutexes, message queues).

Update #4546.
2021-11-23 11:00:28 +01:00
Sebastian Huber
50aef135a4 score: Add _Thread_MP_Extract_proxy()
Remove _Thread_queue_Extract_with_proxy() and move the proxy extraction
to _Thread_MP_Extract_proxy().  Move similar code blocks of the previous
caller of _Thread_queue_Extract_with_proxy() to helper functions.

Update #4546.
2021-11-23 11:00:28 +01:00
Sebastian Huber
3d6ebde1ac score: Add SMP scheduler make/clean sticky
This patch fixes the following broken behaviour:

  While a thread is scheduled on a helping scheduler, while it does not
  own a MrsP semaphore, if it obtains a MrsP semaphore, then no
  scheduler node using an idle thread and the ceiling priority of the
  semaphore is unblocked for the home scheduler.

This could lead to priority inversion issues and is not in line
with the MrsP protocol.

Introduce two new scheduler operations which are only enabled if
RTEMS_SMP is defined.  The operations are used to make the scheduler
node of the home scheduler sticky and to clean the sticky property.
This helps to keep the sticky handing out of the frequently used
priority update operation.

Close #4532.
2021-11-23 11:00:28 +01:00
Sebastian Huber
577262a737 score: Add red-black tree append/prepend
These functions are a faster alternative to _RBTree_Insert_inline() if
it is known that the new node is the maximum/minimum node.

Update #4531.
2021-11-23 11:00:28 +01:00
Sebastian Huber
18484f02ad rtems: Add external functions
These external functions rtems_scheduler_get_processor() and
rtems_scheduler_get_processor_maximum() which may be used by bindings
for languages other than C/C++.
2021-11-18 20:06:17 +01:00
Sebastian Huber
f06dd3e176 build: Optional __RTEMS_MAJOR__ via command line
Update #4548.
2021-11-16 07:46:45 +01:00
Sebastian Huber
9551f340d0 Revert "optvermaj.yml: Allow __RTEMS_MAJOR__ to be overridden so RTEMS 7 tools can be tested"
This reverts commit d1bbfbea5f.
2021-11-15 11:14:12 +01:00
Sebastian Huber
240a1f79b1 score: Introduce CPU budget operations
This patch set replaces the CPU budget algorithm enumeration with a set of CPU
budget operations which implement a particular CPU budget algorithm.  This
helps to hide the CPU budget algorithm implementation details from the general
thread handling.  The CPU budget callouts are turned into CPU budget
operations.  This slightly reduces the size of the thread control block.

All schedulers used the default scheduler tick implementation.  The tick
scheduler operation is removed and the CPU budget operations are directly used
in _Watchdog_Tick() if the executing thread uses a CPU budget algorithm.  This
is performance improvement for all threads which do not use a CPU budget
algorithm (default behaviour).
2021-11-15 08:56:53 +01:00
Joel Sherrill
d1bbfbea5f optvermaj.yml: Allow __RTEMS_MAJOR__ to be overridden so RTEMS 7 tools can be tested 2021-11-12 10:02:51 -06:00
Kinsey Moore
a857a225d0 cpukit/aarch64: Add libdebugger support
This adds support for libdebugger under AArch64 using software
breakpoints and the single-step execution mode present in all AArch64
CPUs.
2021-11-01 08:39:00 -05:00
Kinsey Moore
2055e42362 aarch64: Break out MMU definitions
This moves the AArch64 MMU memory type definitions into cpukit for use
by libdebugger since remapping of memory is required to insert software
breakpoints.
2021-11-01 08:39:00 -05:00
Kinsey Moore
c5986a5520 testsuite: Add machine exception signal map test
Add a test to verify that mapping of machine exceptions to POSIX signals
operates properly when the application requests it.
2021-10-29 12:40:56 -05:00
Kinsey Moore
4812a8b572 cpukit: Add signal mapping support
This adds a confdef option allowing an application to request mapping
machine exceptions to POSIX signals. This is required for some languages
such as Ada.
2021-10-29 12:40:56 -05:00
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
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
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
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
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