257 Commits

Author SHA1 Message Date
Christian Mauderer
3393edcb4b bsp/imxrt: Enable cache handling
The BSP needs the CPU_DATA_CACHE_ALIGNMENT set to enable correct cache
handling in libbsd. Otherwise for example USB doesn't work reliable.
2023-08-21 09:17:02 +02:00
Sebastian Huber
30116094a9 Define IFCAP_NOMAP for Newlib compatibility 2022-07-07 14:23:25 +02:00
Sebastian Huber
2f7103677c Define IN_HISTORICAL_NETS for kernel space
Required by FreeBSD commit:

Author: Mike Karels <karels@FreeBSD.org>
Date:   Tue Oct 26 22:01:09 2021 -0500

    kernel: deprecate Internet Class A/B/C

    Hide historical Class A/B/C macros unless IN_HISTORICAL_NETS is defined;
    define it for user level.  Define IN_MULTICAST separately from IN_CLASSD,
    and use it in pf instead of IN_CLASSD.  Stop using class for setting
    default masks when not specified; instead, define new default mask
    (24 bits).  Warn when an Internet address is set without a mask.

    MFC after:      1 month
    Reviewed by:    cy
    Differential Revision: https://reviews.freebsd.org/D32708
2022-07-07 14:23:25 +02:00
Konstantin Belousov
7974c8b9db Kernel-side infrastructure to implement nvlist-based set/get ifcaps
Reviewed by:	hselasky, jhb, kp (previous version)
Sponsored by:	NVIDIA Networking
MFC after:	3 weeks
Differential revision:	https://reviews.freebsd.org/D32551
2022-07-07 14:23:25 +02:00
Rick Macklem
e86ac20e9f uipc_socket.c: Modify MSG_TLSAPPDATA to only do Alert Records
Without this patch, the MSG_TLSAPPDATA flag would cause
soreceive_generic() to return ENXIO for any non-application
data record in a TLS receive stream.

This works ok for TLS1.2, since Alert records appear to be
the only non-application data records received.
However, for TLS1.3, there can be post-handshake handshake
records, such as NewSessionKey sent to the client from the
server. These handshake records cannot be handled by the
upcall which does an SSL_read() with length == 0.

It appears that the client can simply throw away these
NewSessionKey records, but to do so, it needs to receive
them within the kernel.

This patch modifies the semantics of MSG_TLSAPPDATA slightly,
so that it only applies to Alert records and not Handshake
records. It is needed to allow the krpc to work with KTLS1.3.

Reviewed by:	hselasky
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D35170
2022-07-07 14:23:25 +02:00
Kristof Provost
d9027851bd Widen ifnet_detach_sxlock coverage
Widen the ifnet_detach_sxlock to cover the entire vnet sysuninit code.
This ensures that we can't end up having the vnet_sysuninit free the UDP
pcb while the detach code is running and trying to purge the UDP pcb.

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D28530
2022-07-07 14:23:25 +02:00
Rick Macklem
4de7ab7e97 Add the MSG_TLSAPPDATA flag to indicate "return ENXIO" for non-application TLS data records.
The kernel RPC cannot process non-application data records when
using TLS. It must to an upcall to a userspace daemon that will
call SSL_read() to process them.

This patch adds a new flag called MSG_TLSAPPDATA that the kernel
RPC can use to tell sorecieve() to return ENXIO instead of a non-application
data record, when that is what is at the top of the receive queue.
I put the code in #ifdef KERN_TLS/#endif, although it will build without
that, so that it is recognized as only useful when KERN_TLS is enabled.
The alternative to doing this is to have the kernel RPC re-queue the
non-application data message after receiving it, but that seems more
complicated and might introduce message ordering issues when there
are multiple non-application data records one after another.

I do not know what, if any, changes will be required to support TLS1.3.

Reviewed by:	glebius
Differential Revision:	https://reviews.freebsd.org/D25923
2022-07-07 14:23:25 +02:00
Sebastian Huber
f009252227 user-space: Request FreeBSD bitset API
This is required for recent Newlib versions.

Update #4667.
2022-06-30 17:41:02 +02:00
Sebastian Huber
c6212520ab Add program destructor support
Update #4650.
2022-05-12 07:48:02 +02:00
Sebastian Huber
1b6529ee94 rtems-bsd-program.h: Remove stray ';' 2022-02-23 15:57:30 +01:00
Gedare Bloom
8f870a3593 aarch64/nexus: add GEM definitions for Versal 2021-06-25 13:02:38 -06:00
Christian Mauderer
1bb4a56e4d STM32H7: Add SDMMC driver
Update #4372
2021-04-01 09:05:53 +02:00
G S Niteesh Babu
3cdf289424 arm/ti/ti_pinmux: Remove TI pinmux driver
The TI driver has been moved to RTEMS so the driver can be removed
from libBSD.

The following files have been removed from libBSD and moved to
RTEMS.
1) ti/am335x/am335x_scm_padconf.c
2) ti/am335x/am335x_scm_padconf.h
3) ti/ti_pinmux.c
4) ti/ti_pinmux.h

Update #3784
2021-03-21 12:35:04 +01:00
Kinsey Moore
98d197895b Add CGEM definitions for ZynqMP 2020-11-24 08:49:49 -06:00
Kinsey Moore
9f52a0df17 Update arm64/aarch64 support 2020-11-13 12:34:01 -06:00
Sebastian Huber
d56d9b6d3b ifmcstat: Port to RTEMS 2020-09-10 13:24:18 +02:00
Christian Mauderer
4820ccecc9 busdma: Option to round to cache lines on sync
Some targets support only flushing or invalidating complete cache lines.
In this cases misaligned buffers might lead to unexpected results. This
patch adds a flag that allows drivers to signal to the bus dma driver
that it is OK to round a buffer to the next full cache line. That's for
example necessary if a driver wants to send out 14 byte via a USB DMA.
Only the driver knows whether these 14 bytes are located in an otherwise
unused cache line aligned buffer.
2020-07-29 11:19:14 +02:00
Christian Mauderer
c54699f40f Add support for i.mx cache.
Update #3869.
2020-04-15 16:32:34 +02:00
Sebastian Huber
e6acc15bc9 NVMECONTROL(8): Port to RTEMS
Update #3821.
2019-11-13 13:04:09 +01:00
Sebastian Huber
a5ddb0ea69 Update to FreeBSD head 2019-09-24
Git mirror commit 6b0307a0a5184339393f555d5d424190d8a8277a.
2019-11-13 10:47:04 +01:00
Sebastian Huber
5f2d63683a Add support for EARLY_COUNTER 2019-09-25 10:58:17 +02:00
Sebastian Huber
747c6165b8 Compatibility for next Newlib update 2019-09-24 14:10:43 +02:00
Sebastian Huber
e9730d5fc5 Fix pgsigio() warnings 2019-09-24 14:07:12 +02:00
Sebastian Huber
5173168252 C++ compatiblity for kernel space header 2019-09-23 10:55:44 +02:00
Sebastian Huber
7b1aea98a1 Add wrapper for strndup() 2019-09-11 10:25:49 +02:00
Sebastian Huber
8bf5f93ac1 atomic.h: Add atomic_load_long() 2019-08-27 10:31:42 +02:00
Vijay Kumar Banerjee
530f8f5abd am335x display drivers: Port to RTEMS 2019-08-11 15:57:54 +02:00
Vijay Kumar Banerjee
d7c01f4569 fbd: Port to RTEMS 2019-08-11 15:57:54 +02:00
Vijay Kumar Banerjee
2cf7b6b3e4 TDA19988: Port to RTEMS 2019-08-11 15:57:54 +02:00
Vijay Kumar Banerjee
59ce99a357 Pinmux: Port to RTEMS 2019-08-11 15:57:54 +02:00
Vijay Kumar Banerjee
b68ca55c96 Add mmap 2019-07-27 13:49:07 +02:00
Sebastian Huber
313e1d5f1c SLEEPQUEUE(9): Fix timeout handling 2019-07-05 10:20:18 +02:00
Vijay Kumar Banerjee
4ed60d9076 i2c tool : port to RTEMS 2019-06-29 10:31:01 +02:00
Vijay Kumar Banerjee
4e1325a338 iicbus: port to RTEMS 2019-06-29 10:31:01 +02:00
Sebastian Huber
3bd43f00a7 Add RTEMS-specific getcredhostuuid() 2019-06-05 14:26:38 +02:00
Sebastian Huber
c727e4a22e Separate libbsd and RTEMS clock ticks 2019-05-15 12:43:06 +02:00
Sebastian Huber
1a5db378e2 Remove unused maxusers 2019-05-13 11:19:50 +02:00
Sebastian Huber
b7a88f1414 Remove jail/prison functions from namespace 2019-05-13 11:19:50 +02:00
Sebastian Huber
3400fa0d69 Add wrapper for abort() 2019-05-13 09:45:51 +02:00
Sebastian Huber
c6261f9787 Update due to API changes 2019-04-11 09:38:18 +02:00
Sebastian Huber
9fabaaec3e Revert "Add BURN_BRIDGES global kernel option"
This reverts commit 0904e3371406d2775cba848da441e00fd1ef1ef6.
2019-03-29 06:55:51 +01:00
Sebastian Huber
0904e33714 Add BURN_BRIDGES global kernel option 2019-03-28 11:35:47 +01:00
Christian Mauderer
d1dac7891c bin/openssl: Port to RTEMS. 2019-03-27 10:53:26 +01:00
Sebastian Huber
0dbc4e269b Fix atomic_load_32() 2019-02-18 10:03:57 +01:00
Sebastian Huber
b3bbfdfe91 ZONE(9): Fix UMA_PCPU_ALLOC_SIZE
Using CACHE_LINE_SIZE for UMA_PCPU_ALLOC_SIZE was a huge memory waste
since the backend memory allocator is page based.
2019-02-12 08:57:42 +01:00
Sebastian Huber
1c3a92d81e atomic.h: Add atomic_fetchadd_64() 2019-02-11 15:20:11 +01:00
Sebastian Huber
4c8a1addeb atomic.h: Add atomic_load_32() 2019-02-11 09:36:55 +01:00
Sebastian Huber
f60ac53420 Update rtems-bsd-kernel-namespace.h 2018-12-20 13:49:03 +01:00
Sebastian Huber
e0b4edbdcc Update to FreeBSD head 2018-11-15
Git mirror commit a18b0830c4be01b39489a891b63d6023ada6358a.

Update #3472.
2018-11-15 10:56:14 +01:00
Sebastian Huber
d4bf70e497 Disable or make static kern_* functions 2018-11-15 10:06:58 +01:00