Commit Graph

35700 Commits

Author SHA1 Message Date
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
Pedro F. Giffuni
4fe13bdab1 General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

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.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2022-09-08 16:14:56 +02:00
Sebastian Huber
ac31e2f993 libtests/sha: Add tests for SHA512-256 2022-09-08 16:14:56 +02:00
Sebastian Huber
fdbf89fee7 libtests/sha: Add tests for SHA512-224 2022-09-08 16:14:56 +02:00
Sebastian Huber
d37baa17e6 libtests/sha: Add tests for SHA384 2022-09-08 16:14:56 +02:00
Sebastian Huber
bea7e5a0ff libtests/sha: Add tests for SHA224 2022-09-08 16:14:56 +02:00
Xin LI
f5ee9a0e0b libmd: Always erase context in _Final method,
and when doing it, consistently use explicit_bzero().

Update manual pages to match the behavior.

Reviewed by:	pfg, allanjude, jmg
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D16316
2022-09-08 16:14:56 +02:00
Conrad Meyer
efd19aa7c1 Implement SHA2-224 submode of SHA2-256
Like SHA2-384:SHA2-512, SHA2-224 is simply a truncated SHA2-256 with a
different initial vector.  Add to round out the complete basic SHA2 family.
2022-09-08 16:14:56 +02:00
Alan Somers
48f7979f5d Fix C++ includability of crypto headers with static array sizes
C99 allows array function parameters to use the static keyword for their
sizes. This tells the compiler that the parameter will have at least the
specified size, and calling code will fail to compile if that guarantee is
not met. However, this syntax is not legal in C++.

This commit reverts r300824, which worked around the problem for
sys/sys/md5.h only, and introduces a new macro: min_size(). min_size(x) can
be used in headers as a static array size, but will still compile in C++
mode.

Reviewed by:	cem, ed
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D8277
2022-09-08 16:14:56 +02:00
Colin Percival
4ebb5f893e Retune SHA2 code for improved performance on CPUs
with more ILP and a preference for memory load instructions over large code
footprints with embedded immediate variables.

On amd64 CPUs from 2007-2008 there is not a significant change, but
amd64 CPUs from 2009-2010 get roughly 10% more throughput with this
code; amd64 CPUs from 2011-2012 get roughly 15% more throughput; and
AMD64 CPUs from 2013-2015 get 20-25% more throughput.  The Raspberry
Pi 2 increases its throughput by 6-8%.

Sponsored by:	Tarsnap Backup Inc.
Performance tested by:	allanjude
MFC after:	3 weeks
2022-09-08 16:14:56 +02:00
Allan Jude
7b4296ed19 Implement SHA-512 truncated (224 and 256 bits)
This implements SHA-512/256, which generates a 256 bit hash by
calculating the SHA-512 then truncating the result. A different initial
value is used, making the result different from the first 256 bits of
the SHA-512 of the same input. SHA-512 is ~50% faster than SHA-256 on
64bit platforms, so the result is a faster 256 bit hash.

The main goal of this implementation is to enable support for this
faster hashing algorithm in ZFS. The feature was introduced into ZFS
in r289422, but is disconnected because SHA-512/256 support was missing.
A further commit will enable it in ZFS.

This is the follow on to r292782

Reviewed by:	cem
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D6061
2022-09-08 16:14:56 +02:00
Conrad Meyer
3a22e5d30f crypto routines: Hint minimum buffer sizes to the compiler
Use the C99 'static' keyword to hint to the compiler IVs and output digest
sizes.  The keyword informs the compiler of the minimum valid size for a given
array.  Obviously not every pointer can be validated (i.e., the compiler can
produce false negative but not false positive reports).

No functional change.  No ABI change.

Sponsored by:	EMC / Isilon Storage Division
2022-09-08 16:14:56 +02:00