Commit Graph

35561 Commits

Author SHA1 Message Date
Sebastian Huber
45ee958552 config: Add CONFIGURE_IDLE_TASK_STORAGE_SIZE
By default, allocate the IDLE task storage areas from the RTEMS Workspace.
This avoids having to estimate the thread-local storage size in the default
configuration.

Add the application configuration option CONFIGURE_IDLE_TASK_STORAGE_SIZE to
request a static allocation of the task storage area for IDLE tasks.

Update #3835.
Update #4524.
2022-10-14 10:48:23 +02:00
Sebastian Huber
6a8208533d stackchk01: Check CPU_STACK_MINIMUM_SIZE
Ensure that the CPU_STACK_MINIMUM_SIZE is suffiently larger than the stack
usage in simple applications.
2022-10-14 10:48:23 +02:00
Sebastian Huber
829e489230 stackchk: Add rtems_stack_checker_iterate() 2022-10-14 10:48:23 +02:00
Sebastian Huber
03ddd89459 stackchk: Avoid internal header file 2022-10-14 10:48:23 +02:00
Sebastian Huber
1ab93ba480 score: INTERNAL_ERROR_IDLE_THREAD_CREATE_FAILED
Add the INTERNAL_ERROR_IDLE_THREAD_CREATE_FAILED fatal error in case the
creation of an idle thread fails.  This may happen due to a failing create
extension provided by the application.
2022-10-14 10:48:22 +02:00
Sebastian Huber
8d44129da2 score: Simplify casts 2022-10-14 10:48:22 +02:00
Sebastian Huber
4c89fbcd31 score: Add CPU_THREAD_LOCAL_STORAGE_VARIANT
Update #3835.
2022-10-14 10:48:22 +02:00
Sebastian Huber
15bba4aecf score: Move Thread_Control::Registers member
Place this member placed directly after the end of the common block so that
the structure offsets are as small as possible.  This helps on instruction
set architectures with a very limited range for intermediate values.  For
example, see the __aeabi_read_tp() implementation for ARM Thumb-1.

Update #3835.
2022-10-14 10:48:22 +02:00
Sebastian Huber
2846b17d7e config: Changeable size for IDLE stack allocator
Allow the IDLE stack allocator to change the stack size.  This can be
used by applications with a very dynamic thread-local storage size to
adjust the thread storage area of the IDLE tasks dynamically.

Update #4524.
2022-10-14 07:29:41 +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
Sebastian Huber
dc545608a7 sptls02: Fix alignment check 2022-10-14 07:29:41 +02:00
Sebastian Huber
b9212e242f sptls01: Disable file system and Newlib reentrancy
Update #4560.
2022-10-14 07:29:41 +02:00
Sebastian Huber
0307c81aa0 sptls0*: Enable stack checker
The thread-local storage area is located close to other stacks.  Try to detect
overwrites.
2022-10-14 07:29:41 +02:00
Chris Johns
580a3a6817 libmisc/rtems-fdt: Fix return error values
Updates #4729
2022-10-14 13:43:08 +11:00
Sebastian Huber
97fce5120c build: Enable RISCV_BOOT_HARTID only for riscv 2022-10-13 06:24:23 +02:00
Chris Johns
fe104e399a libmisc/rtems-fdt: Fix missing error string
- Coverity CID 1515930 issue

Updates #4729
2022-10-11 12:50:30 +11:00
Chris Johns
40eb58fd5e libmisc/rtems-fdt: Update to support 64bit addresses
- Add support to get the parent address and size cells

- Provide support to get a reg prop address map

- Change getting a set of properties to uintptr_t

- Improve the debug mode of the ls command to print all props

Closes #4729
2022-10-10 11:40:55 +11:00
Sebastian Huber
46f08961a2 psxrwlock01: Use an initilized lock for tests
Close #4738.
2022-10-07 07:14:51 +02:00
Sebastian Huber
0a9ba96389 config: CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE
Move CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE to the general configuration
options.
2022-10-06 09:17:24 +02:00
Sebastian Huber
3bad6b8ff9 validation: Fix wording 2022-10-06 09:03:06 +02:00
Mohd Noor Aman
b57c6541a1 bsp/aarch64: Add new Raspberry Pi 4B BSP
This patch adds new Raspberry pi 4B AArch64 BSP to the RTEMS Family. Currently
only LP64 ABI is supported. ILP32 is not supported. RAM starts from 0x80000 in
64Bit kernel mode and MMU from 0x0. All Raspberrypi Pi 4B models and Raspberry
Pi 400 are supported. All the IRQs are similiar to the older Raspberry pi 2 ARM
BSP.

Raspberry Pi 4B has 2 types of UARTs. Only PL011 serial is supported currently.
Mini-UART is not supported. Mini-UART is default UART on the board so it needs
to be disabled by adding "dtoverlay=disable-bt" to the config.txt. No support
for additional 4 PL011-UARTs on the board.

The raspberrypi.h includes many of the address required for the future
development of the RPi 4B BSP. This includes peripherals, ARM Timer, VideoCore
Timer, Watchdog, Mailbox, AUX, FIQs and IRQs.
2022-10-04 17:04:44 -05:00
Sebastian Huber
cc43dc3e22 rtems: Clarify application config info API
Update #3993.
2022-10-04 10:44:10 +02:00
Kinsey Moore
3af84c1bea cpukit/fdt: Free index before container
Ensure that the index is released before the structure containing it is
freed and NULLed.

Updates #4460
2022-10-03 13:24:46 -05:00
Kinsey Moore
584f5bc9af cpukit/fdt: Check correct allocation
The second allocation check was mistakenly rechecking the first
allocation. It now checks the correct allocation and ensures that names
is not NULL.

Updates #4462
2022-10-03 13:24:46 -05:00
Sebastian Huber
c6bd860f13 rtems: Fix format 2022-09-30 14:54:27 +02:00
Sebastian Huber
a3717de01c validation: Remove unused test suite
Update #3716.
2022-09-28 13:49:31 +02:00
Sebastian Huber
9ed7103c61 score: Simplify Chain_Node definition
Fix documentation.
2022-09-23 11:14:58 +02:00
Sebastian Huber
acf1e5b266 rtems: Add rtems_clock_get_ticks_since_boot() function
This function was declared, however, a definition was missing.  Add a
validation test for it.
2022-09-23 11:14:58 +02:00
Sebastian Huber
962904cd94 bsps: Fix format specifier
Close #4722.
2022-09-23 08:37:59 +02:00
Sebastian Huber
74a78fbfd1 rtems: Fix typo in rtems_build_name() definition 2022-09-22 13:20:59 +02:00
Sebastian Huber
ade8d995aa build: Install SHA header files
Update #3719.
2022-09-22 08:27:25 +02:00
Sebastian Huber
f6e7c62705 bsps/arm: Mark functions in start.S
Add the function type to _start() and bsp_start_hook_0_done() so that
the linker can generate ARM/Thumb interworking code.

Update #4202.
2022-09-22 08:05:06 +02:00
Sebastian Huber
3edf9cba67 bsps/arm: Move bsp_start_hook_0_done()
Declare bsp_start_hook_0_done() in <bsp/start.h>.
2022-09-22 07:59:05 +02:00
Sebastian Huber
80be0de40e bsps/arm: Add comment about banked FIQ registers 2022-09-22 07:59:04 +02:00
Padmarao Begari
d0b92735b0 bsps/shared/: Use device tree blob
If the bsp is integrated and supported a device tree
blob(dtb) then use dtb instead of using it from
the U-Boot (BSP_START_COPY_FDT_FROM_U_BOOT=False).
2022-09-20 12:00:51 -05: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
Padmarao Begari
974c6ea9d6 spec/build/bsps: Add dtb support
Add dtb and dtb header path configurable build option
2022-09-20 12:00:51 -05:00
Padmarao Begari
9cdc00881e bsps/riscv: Add device tree blob
Add the basic Microchip PolarFire SoC device tree source and blob

The mpfs-dtb.h is generated by the bin2hex

https://github.com/padmaraob/bin2hex

1.Compile and build the bin2hex.c
	$ gcc -o bin2hex bin2hex.c

2.Generate the mpfs.dtb from the mpfs.dts
	$ dtc -O dtb -o mpfs.dtb mpfs.dts

3.Generate the mpfs-dtb.h Header file from the mpfs.dtb.
	$ ./bin2hex mpfs.dtb
2022-09-20 12:00:51 -05:00
Sebastian Huber
63cf583365 bsp/tms570: Fix TMS570_USE_HWINIT_STARTUP
Make sure only one module is built which defines bsp_start_hook_0().
2022-09-20 10:35:06 +02:00
Sebastian Huber
f3f5b2781f bsp/tms570: Fix declarations
This avoids multiple definition errors.
2022-09-20 10:35:06 +02:00
Sebastian Huber
9a55120420 bsp/tms570: Add -mbe32 to LINKFLAGS
There is not just big-endian on ARM.  We have two variants BE32
(obsolete) and BE8.  The Cortex-R5F processor supports only BE8,
however, some TMS570 variants are BE32 internally.  In GCC 8 and later,
the --be8 option is passed to the linker based on the selected
architecture or CPU.  Use BE32 by default for the TMS570 BSP.

In GCC, see:

commit 63d03dcecdafe34715282a5155cfc2162375feca
Author: Richard Earnshaw <rearnsha@arm.com>
Date:   Mon Jul 3 13:22:05 2017 +0000

     [arm] Clean up generation of BE8 format images.
2022-09-20 10:34:35 +02:00
Alan Cudmore
88f4d44f00 bsps/riscv/riscv: Fix fe310_uart_read
Note: Resending after learning how to use git send-email, please disregard previous message.

This fixes the riscv fe310 console driver fe310_uart_read function. The function
reads the RX status/data register to check if data is available, but discards
the data and reads it a seconds time.
Also cleared the interrupt enable bit in the first_open function.

Close #4719
2022-09-19 17:10:01 +02: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
3803757b2c validation: Test deadlock detection special case
Update #3716.
2022-09-12 09:39:04 +02:00
Sebastian Huber
4fdf79cca5 score: Prevent an out of bounds warning
Update #4702.
2022-09-12 09:37:37 +02:00
Sebastian Huber
8d32b9884c validation: Fix integer type warning
Update #4662.
2022-09-09 08:09:11 +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
Xin LI
fe90ada455 libcrypt: There is no need to clear message digest
context after they are finialized after r336539, so do not do it.

Submitted by:	David CARLIER <devnexen gmail com>
MFC after:	1 month (after r336539)
Differential Revision:	https://reviews.freebsd.org/D16059
2022-09-08 16:14:56 +02:00
Xin LI
1acb1925e9 Get rid of unused variables.
copied_key and copied_salt are assigned with NULL and never used
otherwise. Remove the two variables and related code.

Reviewed by:	pfg
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D16314
2022-09-08 16:14:56 +02:00
Pedro F. Giffuni
6fe3acd0d7 lib: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
2022-09-08 16:14:56 +02:00