summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/riscv (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-09-15score: Add _CPU_Get_TLS_thread_pointer()Sebastian Huber1-0/+7
Add _CPU_Get_TLS_thread_pointer() to get the thread pointer which is used to get the address of thread-local storage objects associated with a thread. Update #4920.
2023-06-12score: Remove CPU port specific cpuatomic.hSebastian Huber1-31/+0
All CPU ports used the same <rtems/score/cpustdatomic.h> header file to provide the atomic operations. Remove the header file indirection.
2023-05-20Update company nameSebastian Huber10-10/+10
The embedded brains GmbH & Co. KG is the legal successor of embedded brains GmbH.
2022-11-14cpukit: Change license to BSD-2 for files with Gaisler copyrightDaniel Cederman1-3/+22
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-09riscv: Simplify _CPU_ISR_Set_level()Sebastian Huber1-15/+13
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-09riscv: Remove superfluous init/fini functionsSebastian Huber1-12/+0
2022-10-14riscv: Move functions to avoid build issuesSebastian Huber1-0/+10
The _RISCV_Map_cpu_index_to_hardid() and _RISCV_Map_hardid_to_cpu_index() functions must be available to all riscv BSPs.
2022-10-14score: Add CPU_THREAD_LOCAL_STORAGE_VARIANTSebastian Huber2-1/+3
Update #3835.
2022-09-20bsps/riscv: Add Microchip PolarFire SoC BSP variantPadmarao Begari2-2/+2
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-19Do not use RTEMS_INLINE_ROUTINESebastian Huber2-5/+5
Directly use "static inline" which is available in C99 and later. This brings the RTEMS implementation closer to standard C. Close #3935.
2022-09-09score: Remove _CPU_Counter_difference()Sebastian Huber1-8/+0
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-07-04score: Add _CPU_Use_thread_local_storage()Sebastian Huber1-0/+12
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-06-24riscv: Include missing header fileSebastian Huber1-0/+2
2022-03-09SMP: Fix start multitasking for some targetsSebastian Huber2-0/+19
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-02-25riscv: Use zicsr architecture extensionSebastian Huber5-11/+46
This is required for ISA 2.0 support, see chapter "Zicsr", Control and Status Register (CSR) Instructions, Version 2.0 in RISC-V Instruction Set Manual, Volume I: RISC-V User-Level ISA
2021-09-21build: Remove old build systemSebastian Huber1-11/+0
Close #3250. Close #4081.
2021-07-28score: Canonicalize _CPU_Fatal_halt()Sebastian Huber2-2/+2
Move _CPU_Fatal_halt() declaration to <rtems/score/cpuimpl.h> and make sure it is a proper declaration of a function which does not return. Fix the type of the error code. If necessary, add the implementation to cpu.c. Implementing _CPU_Fatal_halt() as a function makes it possible to wrap this function for example to fully test _Terminate().
2021-07-28score: Remove processor event broadcast/receiveSebastian Huber1-10/+0
Remove _CPU_SMP_Processor_event_broadcast() and _CPU_SMP_Processor_event_receive(). These functions are hard to use since they are subject to the lost wake up problem.
2021-06-24score: Remove _CPU_Initialize_vectors()Sebastian Huber1-2/+0
This CPU port macro was not used. Since the _ISR_Vector_table[] is statically allocated, CPU ports could initialize this table in _CPU_Initialize() if necessary. Remove _CPU_Initialize_vectors() to simplify the CPU port interface.
2021-05-18score: Add _CPU_Context_switch_no_return()Sebastian Huber2-0/+7
The __builtin_unreachable() cannot be used with current GCC versions to tell the compiler that a function does not return to the caller, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99151 Add a no return variant of _CPU_Context_switch() to avoid generation of dead code in _Thread_Start_multitasking() if RTEMS was built with SMP support enabled.
2020-10-10rtems: Improve RTEMS_NO_RETURN attributeSebastian Huber1-4/+2
Provide RTEMS_NO_RETURN also in case RTEMS_DEBUG is defined to prevent errors like this: error: no return statement in function returning non-void [-Werror=return-type] Use C11 and C++11 standard means to declare a no-return function. Close #4122.
2020-06-30score: Add CPU_USE_LIBC_INIT_FINI_ARRAYKinsey Moore1-0/+2
This introduces the CPU_USE_LIBC_INIT_FINI_ARRAY define for use by CPU ports to determine which global constructor and destructor methods are used instead of placing architecture defines where they shouldn't be. Close #4018
2019-11-29Regenerate headers.amSebastian Huber1-0/+1
2019-11-12riscv: preliminarily support for libdlHesham Almatary1-0/+144
Support for targets compiled with -fno-pic and -mno-relax
2019-04-02doxygen: score: Add RISC-V CPU architecture groupAndreas Dachsberger4-1/+26
Update #3706.
2019-03-26score: Rename ScoreCPU Doxygen groupSebastian Huber1-1/+1
Update #3706.
2019-03-14Remove superfluous <rtems/system.h> includesSebastian Huber1-1/+0
2019-02-28Remove explicit file names from @fileSebastian Huber3-3/+3
This makes the @file documentation independent of the actual file name. Update #3707.
2019-02-02riscv: Fix misaligned access in context validateSebastian Huber1-1/+1
2019-01-22riscv: add griscv bspJiri Gaisler1-4/+1
Update #3678.
2019-01-22grlib: use cpu-independent routines for uncached accessJiri Gaisler3-0/+83
Update #3678.
2019-01-09riscv: Enable robust thread dispatchSebastian Huber1-0/+3
It must be enabled, since the context switch code does not save/restore the interrupt status. Update #3433.
2018-10-10build: Include header.am in cpukit/Makefile.amSebastian Huber2-14/+7
Include all cpukit/*/header.am files in cpukit/Makefile.am. This gets rid of all subtree Makefile.am and the sudirs hack.
2018-10-10build: Merge score/cpu/*/Makefile.amSebastian Huber1-12/+0
2018-10-09build: Remove specialized CPPFLAGSSebastian Huber1-1/+0
2018-10-05score: Remove CPU_PROVIDES_IDLE_THREAD_BODYSebastian Huber1-1/+0
Remove the CPU_PROVIDES_IDLE_THREAD_BODY option to avoid unnecessary conditional compilation. Close #3539.
2018-08-02score: Remove CPU_PARTITION_ALIGNMENTSebastian Huber1-2/+0
Use the CPU_SIZEOF_POINTER alignment instead. The internal alignment requirement is defined by the use of Chain_Node (consisting of two pointers) to manage the free chain of partitions. It seems that previously the condition CPU_PARTITION_ALIGNMENT >= sizeof(Chain_Node) was true on all CPU ports. Now, we need an additional check. Update #3482.
2018-08-02riscv: Fix CPU_ALIGNMENTSebastian Huber1-1/+3
Update #3433.
2018-07-27riscv: Rework CPU counter supportSebastian Huber4-5/+91
Update #3433.
2018-07-25riscv: Add CLINT and PLIC supportSebastian Huber1-5/+45
The CLINT and PLIC need some per-processor state. Update #3433.
2018-07-25riscv: Use wfi instruction for idle taskSebastian Huber2-12/+3
Update #3433.
2018-07-25riscv: Rework exception handlingSebastian Huber6-144/+54
Remove _CPU_ISR_install_raw_handler() and _CPU_ISR_install_vector() functions. Applications can install an exception handler via the fatal error handler to handle synchronous exceptions. Handle interrupt exceptions via _RISCV_Interrupt_dispatch() which must be provided by the BSP. Update #3433.
2018-07-25riscv: New CPU_Exception_frameSebastian Huber4-64/+203
Use the CPU_Interrupt_frame for the volatile context. Add non-volatile registers and extra state on top of it. Update #3433.
2018-07-25riscv: Add exception codesSebastian Huber1-0/+39
Update #3433.
2018-07-23score: Add _CPU_Instruction_illegal()Sebastian Huber1-0/+5
On some architectures/simulators it is difficult to provoke an exception with misaligned or illegal data loads. Use an illegal instruction instead. Update #3433.
2018-07-20score: Add _CPU_Instruction_no_operation()Sebastian Huber1-0/+5
This helps to reduce the use of architecture-specific defines throughout the code base.
2018-07-20score: Move context validation declarationsSebastian Huber2-4/+4
The context validation support functions _CPU_Context_validate() and _CPU_Context_volatile_clobber() are used only by one test program (spcontext01). Move the function declarations to the CPU port implementation header file.
2018-07-20score: Remove obsolete CPU port definesSebastian Huber1-4/+0
2018-07-06riscv: Add LADDR assembler defineSebastian Huber2-2/+12
An address must be loaded to a register according to the code model. Add LADDR define for use in assembler code. Update #3433.
2018-07-06riscv: Implement CPU counterSebastian Huber2-2/+16
Update #3433.