Commit Graph

1859 Commits

Author SHA1 Message Date
Sebastian Huber
233c21a232 score: Add files to Doxygen groups
Update #3707.
2023-07-26 07:18:29 +02:00
Sebastian Huber
f8d4f16da6 score: Add workaround for GCC bug
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108658

This GCC bug leads to an incomplete code coverage status.

Update #4932.
2023-07-25 08:04:08 +02:00
Karel Gardas
0e4e9dd421 score/arm: improve printed exception information for Cortex-Mx CPUs
Sponsored-By:	Precidata
2023-07-14 12:38:14 +02:00
Sebastian Huber
3e0314e8be bsps/sparc: Remove BSP_POWER_DOWN_AT_FATAL_HALT
Remove the BSP_POWER_DOWN_AT_FATAL_HALT BSP option.  Applications should
do the customization of the system termination with an initial fatal
extension.
2023-07-14 12:21:33 +02:00
Sebastian Huber
0613593148 score: Remove CPU port specific cpuatomic.h
All CPU ports used the same <rtems/score/cpustdatomic.h> header file to
provide the atomic operations.  Remove the header file indirection.
2023-06-12 07:46:23 +02:00
Sebastian Huber
bdb4bc436f arm: Use RTEMS_XCONCAT()
Prefer macros with a proper namespace.
2023-05-26 06:56:11 +02:00
Sebastian Huber
991919da3b arm: Improve Doxygen file comments 2023-05-26 06:56:11 +02:00
Sebastian Huber
bcef89f236 Update company name
The embedded brains GmbH & Co. KG is the legal successor of embedded
brains GmbH.
2023-05-20 11:05:26 +02:00
Tian Ye
e06152b82d bsps/aarch64: Fix 128bit q register print bug 2023-05-16 08:41:29 -05:00
Karel Gardas
1590df5f9a bsps/amd64: increase CPU alignment to 16
AMD64 requires SSE support which operates on 128bit data values.
2023-04-29 20:41:23 +02:00
Karel Gardas
139bc390b5 score/arm: enhance ARMV7M MPU setup with capability to set control register
Due to API change, the patch also fixes affected BSPs and uses
value provided by MPU CTRL spec option there.

Sponsored-By:	Precidata
2023-03-16 15:40:22 +01:00
Sebastian Huber
d0dd98cca0 sparc: Add header files to Doxygen group 2023-03-15 16:01:06 +01:00
Sebastian Huber
4f274b6925 powerpc: Increase MAS0 ESEL width
For example, the QorIQ T4240 has more than 16 TLB1 entries.
2023-01-23 09:56:52 +01:00
Sebastian Huber
f8cb1f483d arm: Enable thread ID register for ARMv6
Close #4759.
2023-01-03 09:01:46 +01:00
Daniel Cederman
9384ac2d65 cpukit: Change license to BSD-2 for files with Gaisler copyright
This patch changes the license to BSD-2 for all source files where the
copyright is held by Aeroflex Gaisler, Cobham Gaisler, or Gaisler Research.
Some files also includes copyright right statements from OAR and/or
embedded Brains in addition to Gaisler.

Updates #3053.
2022-11-14 11:00:58 +01:00
Sebastian Huber
8f6dd3ca1f arm: Fix Armv7-M TLS support
Set the thread ID register in the CPU context.

Update #3835.
Close #4753.
2022-11-10 11:10:46 +01:00
Sebastian Huber
4a46161b3f riscv: Simplify _CPU_ISR_Set_level()
Where CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE, the only supported interrupt
level allowed to set is 0 (interrupts enabled).  This constraint is enforced by
the API level functions which return an error status for other interrupt
levels.
2022-11-09 16:54:02 +01:00
Sebastian Huber
3a38a0173b riscv: Remove superfluous init/fini functions 2022-11-09 16:54:02 +01:00
Kinsey Moore
080dc5d873 cpukit/aarch64: Emulate FPSR for FENV traps
The AArch64 TRM specifies that when FPCR is set to trap floating point
exceptions, the FPSR exception bits are not set. This ensures that FPSR
is updated as FENV expects even if floating point exception traps are
enabled.
2022-11-09 08:14:11 -06:00
Sebastian Huber
e9a69c5744 riscv: Move functions to avoid build issues
The _RISCV_Map_cpu_index_to_hardid() and _RISCV_Map_hardid_to_cpu_index()
functions must be available to all riscv BSPs.
2022-10-14 10:52:52 +02:00
Sebastian Huber
a1f23c2879 powerpc: Conditionally provide Context_Control_fp
This avoids a pedantic warning about a zero size Context_Control_fp.
2022-10-14 10:48:23 +02:00
Sebastian Huber
985aaac0ab powerpc: Fix 'noreturn' function does return 2022-10-14 10:48:23 +02:00
Sebastian Huber
4c89fbcd31 score: Add CPU_THREAD_LOCAL_STORAGE_VARIANT
Update #3835.
2022-10-14 10:48:22 +02:00
Sebastian Huber
23cdecd839 score: Require power of two CPU_STACK_MINIMUM_SIZE
For most CPU ports this was already the case.  This makes it possible to use
the size as an object alignment using RTEMS_ALIGNED().
2022-10-14 07:29:41 +02:00
Padmarao Begari
6b0d3c9873 bsps/riscv: Add Microchip PolarFire SoC BSP variant
The Microchip PolarFire SoC support is implemented as a
riscv BSP variant to boot with any individual hart(cpu core)
or SMP based on the boot HARTID configurable and support
components are 4 CPU Cores (U54), Interrupt controller (PLIC),
Timer (CLINT), UART.
2022-09-20 12:00:51 -05:00
Sebastian Huber
a660e9dc47 Do not use RTEMS_INLINE_ROUTINE
Directly use "static inline" which is available in C99 and later.  This brings
the RTEMS implementation closer to standard C.

Close #3935.
2022-09-19 09:09:22 +02:00
Sebastian Huber
270200e972 score: Remove _CPU_Counter_difference()
All CPU ports used the same _CPU_Counter_difference() implementation.  Remove
this CPU port interface and mandate a monotonically increasing CPU counter.

Close #3456.
2022-09-09 06:57:10 +02:00
Sebastian Huber
d907c2294a powerpc: Add support for VRSAVE
The VRSAVE feature of the Altivec unit can be used to reduce the amount of
Altivec registers which need to be saved/restored during interrupt processing
and context switches.

In order to use the VRSAVE optimization a corresponding multilib (-mvrsave) is
required, see GCC configuration.  The -mvrsave option must be added to the
ABI_FLAGS of the BSP.

Currently only the -mcpu=e6500 based QorIQ BSP support this optimization.

Update #4712.
2022-09-08 15:54:23 +02:00
Ryan Long
b092ad57e2 cpu.h: Fix gcc 12 warnings
Added two pragmas to address, and changed the value of
AARCH64_EXCEPTION_MAKE_ENUM_64_BIT to INT_MAX because the old value was not
in range of an int.

Updates #4662
2022-08-19 15:34:47 -05:00
Ryan Long
0bd6514aa2 cpukit/libdl: Add support for AArch64
rtl-mdreloc-aarch64.c and elf_machdep.h came from NetBSD.

Updates #4682
2022-07-29 08:32:47 -05:00
Sebastian Huber
5810a08b57 Use __asm__ for standard C compatibility 2022-07-27 17:01:14 +02:00
Kinsey Moore
10ef7087f6 aarch64: Use page table level 0
This alters the AArch64 page table generation and mapping code and MMU
configuration to use page table level 0 in addition to levels 1, 2, and
3. This allows the mapping of up to 48 bits of memory space and is the
maximum that can be mapped without relying on additional processor
extensions. Mappings are restricted based on the number of physical
address bits that the CPU supports.
2022-07-21 12:26:35 -05:00
Kinsey Moore
22015c0251 cpukit/aarch64: Remove _CPU_ISR_install_vector
This function was never actually used and is dead code.
2022-07-05 15:35:56 -05:00
Sebastian Huber
03e4d1e931 score: Add _CPU_Use_thread_local_storage()
At some point during system initialization, the idle threads are created.
Afterwards, the boot processor basically executes within the context of an idle
thread with thread dispatching disabled.  On some architectures, the
thread-local storage area of the associated thread must be set in dedicated
processor registers.  Add the new CPU port function to do this:

void _CPU_Use_thread_local_storage( const Context_Control *context )

Close #4672.
2022-07-04 08:30:42 +02:00
Sebastian Huber
39c09b3b3d riscv: Include missing header file 2022-06-24 13:15:00 +02:00
Chris Johns
5262b9c2ab score/cpu: Silence ARM and AARCH64 GCC 12 false trigger array warning
The false trigger is covered in:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578

GCC 11 and 12 has been patched for constant pointer casts above
4K. This code casts a constant pointer within the first 4K
page. As a result the patch disables the warning.

Updates #4662
2022-06-15 12:57:28 +10:00
Sebastian Huber
c93f0f01e5 arm: Fix PMSA regions for contiguous sections
Sections with identical attributes may be contiguous with a respective
begin and end address which is not on a minimum region boundary.  The
begin address is aligned down to the region base address.  The end
address is aligned up to the region end address.  Account for this in
the check for contiguous sections.

Update #4202.
2022-06-08 09:10:20 +02:00
Sebastian Huber
0b9497a6dd arm: Fix PMSA region mapping with 0x0 end address
A section may span up to the end of the address range.  In this case the
end address is zero.  Use the base address to check if a region should
be before another region.

Update #4202.
2022-06-08 09:10:12 +02:00
Sebastian Huber
a26b9936ff arm: Fix typo 2022-06-03 08:37:14 +02:00
Ryan Long
45a78fdbf5 sparc64-syscall.h: Add file headers and licenses
This file had no header, copyright, or license. Based on git history,
added appropriate copyright and license.
2022-05-04 09:12:01 -05:00
Ryan Long
cce7074279 cpukit/microblaze: Add file headers and licenses
These files had no file header, copyright, or license. Based on git
history, added appropriate copyright and license.
2022-05-04 09:12:01 -05:00
Ryan Long
5efcd021ef x86_64/elf_machdep.h: Replace stub with NetBSD version
The other ports included that architecture's version of this file from
NetBSD. This patch follows that pattern.

closes #4641
2022-04-08 08:36:24 -05:00
Joel Sherrill
ffaaae2cf5 cpukit/score/cpu/moxie: Change license to BSD-2
Permission received from Anthony Green.

Updates #3053.
2022-04-01 10:02:30 -05:00
Joel Sherrill
628bd9b682 cpukit/: Update Eric Norum contact info and normalize file headers 2022-03-24 10:01:51 -05:00
Kinsey Moore
3e3393ac1e cpukit/aarch64: Add Per_CPU_Control accessor
Add an architecture-specific implementation for
_CPU_Get_current_per_CPU_control() to reduce overhead for getting the
current CPU's Per_CPU_Control structure.
2022-03-12 11:55:11 -06:00
Sebastian Huber
74d3abc1db arm: Fix PMSA section to region mapping
Fix move of regions.  Allow sections to be contained in a region (may
happen due to region alignment).
2022-03-11 09:24:57 +01:00
Sebastian Huber
ca74566f7e arm: Add _AArch32_PMSA_Map_sections_to_regions()
This simplifies unit testing.
2022-03-11 09:24:57 +01:00
Joel Sherrill
255fe433fd cpukit/: Scripted embedded brains header file clean up
Updates #4625.
2022-03-10 08:43:49 +01:00
Sebastian Huber
32f0f11a68 SMP: Fix start multitasking for some targets
The previous SMP multitasking start assumed that the initial heir thread of a
processor starts execution in _Thread_Handler().  The _Thread_Handler() sets
the interrupt state explicitly by _ISR_Set_level() before it calls the thread
entry.  Under certain timing conditions, processors may perform an initial
context switch to a thread which already executes its thread body (see
smptests/smpstart01).  In this case, interrupts are disabled after the context
switch on targets which do not save/restore the interrupt state during a
context switch (aarch64, arm, and riscv).

Close #4627.
2022-03-09 21:11:10 +01:00
Joel Sherrill
c0ec0b29e9 score/cpu/v850: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:05 -06:00