2107 Commits

Author SHA1 Message Date
Rick VanderWal
ac4cf946a2 rtemsbsd/sdhci: Fix Arasan driver when no card present
This fixes an issue where the card present signal doesn't stabilize
quickly and indicates present when no card is inserted in a removable
slot.
2023-04-04 09:48:25 -05:00
Joel Sherrill
b0fc22cdf8 waf: Update to waf 2.0.25
Updates #4860
2023-02-20 10:03:48 -06:00
Sebastian Huber
6e4709be52 vfs/nfs: Revert white space changes 2023-01-12 08:22:59 +01:00
Sebastian Huber
84d15c21e6 Use FreeBSD Git repository (not obsolete mirror)
Git commit c6c89ab952f9ffe895939a2621180acc99ae8b80.
2023-01-12 08:22:59 +01:00
Aaron Nyholm
a39a6a249f rtemsbsd/versal: Add SDHCI Driver support
Tested on VCK190

Closes #4762
2022-11-22 13:53:27 +11:00
Kinsey Moore
93b259b129 nexus/zynqmp: Use device trees for CGEM
This moves the ZynqMP BSPs over to using device trees for CGEM
instantiation now that all BSP variants provide appropriate device
trees.
2022-11-10 08:06:31 -06:00
Kinsey Moore
02d383922b freebsd/cgem: Add SGMII support
This adds support to the CGEM driver for selection of SGMII PHY
interfaces specified via device tree parameters.
2022-11-10 08:06:31 -06:00
Kinsey Moore
fef8b8850b freebsd/cgem: Add device tree support
This reintroduces device tree support to the CGEM driver while
preserving the ability to statically define CGEM interfaces.
2022-11-10 08:06:31 -06:00
Kinsey Moore
f462c4de5f rtemsbsd/arasan_sdhci: Improve board/eMMC compat
This improves the compatibility of this driver across board and memory
variants by avoiding use of the HISPD mode.
2022-10-21 15:10:43 -05:00
Kinsey Moore
cf8fa08015 rtemsbsd/arasan_sdhci: Remove redundant clock cap
The BSD SD subsystem enforces a 50MHz clock cap for devices which don't
report their own maximum clock speed. This setting is unnecessary for
the Zynq 7000 version of this IP and restricts the Zynq Ultrascale+
MPSoC version of this IP without need since it reports its maximum speed
as 200MHz.
2022-10-21 15:10:43 -05:00
Kinsey Moore
452637ae99 rtemsbsd/arasan_sdhci: Update description
This driver works on both the Zynq 7000 chips as well as the Zynq
Ultrascale+ MPSoC chips and targets the Arasan SDHCI IP that exists in
both.
2022-10-21 15:10:43 -05:00
Kinsey Moore
ba1b041bd1 rtemsbsd/arasan_sdhci: Stop masking capabilities
The initial version of this driver was masking the capabilities register
to hide 8 bit bus capability. This is not necessary since these devices
report that capability correctly and the masking affects performance
negatively on ZynqMP boards where the 8 bit bus is supported. This also
removes two quirks that were made necessary by the capabilities masking.
2022-10-21 15:10:43 -05:00
Stefan Eßer
9561e24bf8 sys/bitset.h: reduce visibility of BIT_* macros
Add two underscore characters "__" to names of BIT_* and BITSET_*
macros to move them to the implementation name space and to prevent
a name space pollution due to BIT_* macros in 3rd party programs with
conflicting parameter signatures.

These prefixed macro names are used in kernel header files to define
macros in e.g. sched.h, sys/cpuset.h and sys/domainset.h.

If C programs are built with either -D_KERNEL (automatically passed
when building a kernel or kernel modules) or -D_WANT_FREENBSD_BITSET
(or this macros is defined in the source code before including the
bitset macros), then all macros are made visible with their previous
names, too. E.g., both __BIT_SET() and BIT_SET() are visible with
either of _KERNEL or _WANT_FREEBSD_BITSET defined.

The main reason for this change is that some 3rd party sources
including sched.h have been found to contain conflicting BIT_*
macros.

As a work-around, parts of shed.h have been made conditional and
depend on _WITH_CPU_SET_T being set when sched.h is included.
Ports that expect the full functionality provided by sched.h need
to be built with -D_WITH_CPU_SET_T. But this leads to conflicts if
BIT_* macros are defined in that program, too.

This patch set makes all of sched.h visible again without this
parameter being passed and without any name space pollution due
to BIT_* macros becoming visible when sched.h is included.

This patch set will be backported to the STABLE branches, but ports
will need to use -D_WITH_CPU_SET_T as long as there are supported
releases that do not contain these patches.

Reviewed by:	kib, markj
MFC after:	1 month
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D33235
2022-09-28 13:26:14 +02:00
Kinsey Moore
63dae7159f rtemsbsd/arasan_sd: Prevent disabled device probe
Probing a SDIO/SDHCI interface that has been disabled by system init via
holding it in reset can cause a CPU hang. This prevents probing of
devices that have been disabled in such a manner on ZynqMP systems.
2022-09-16 09:41:49 -05:00
Sebastian Huber
a0d36f58fd arm/lpc: Add option to customize device probes 2022-09-06 13:22:45 +02:00
Sebastian Huber
376b24055c stdio/local.h: Make Newlib config independent 2022-07-24 14:52:32 +02:00
Sebastian Huber
763a8a399f 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:22:54 +02:00
Konstantin Belousov
66923c7b02 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:22:54 +02:00
Rick Macklem
5f0e04113f 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:22:54 +02:00
Kristof Provost
ee823c1666 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:22:54 +02:00
Rick Macklem
60f67a1f37 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:22:54 +02:00
Sebastian Huber
731ec09ae0 CONTRIBUTING.rst: Add FreeBSD baseline update hints 2022-07-07 14:22:54 +02:00
Sebastian Huber
9a88b07c33 user-space: Request FreeBSD bitset API
This is required for recent Newlib versions.

Update #4667.
2022-06-30 17:40:33 +02:00
Sebastian Huber
c5c5a199c6 if_lpe.c: Use interface transmit
This avoids the need for a transmit task and transmit interrupts.
2022-06-24 07:33:29 +02:00
Sebastian Huber
1056349b4e if_lpe.c: Move transmit initialization
Move the transmit initialization out of the transmit task to be able to
remove the transmit task in the next patch.
2022-06-24 07:32:50 +02:00
Sebastian Huber
ff4c60af7a if_lpe.c: Port to LibBSD 2022-06-24 07:32:50 +02:00
Sebastian Huber
2722615130 if_lpe.c: Import legacy LPC Ethernet driver
The standard FreeBSD MII support causes severe problems on the LPC3200
chip family.  If an Ethernet module register is accessed while there is
no clock from the PHY, the chip completely locks up and only an external
watchdog can recover from this state.  The legacy driver had a custom
PHY management code which helped to avoid such issues.  The if_lpe.c
driver is no longer maintained by FreeBSD.
2022-06-24 07:32:50 +02:00
Sebastian Huber
3f0f73956d build: Ensure mandatory compiler/linker flags
Make sure the flags are present in all build configurations.
2022-06-23 10:46:17 +02:00
Sebastian Huber
117e0cdafd README.rst: Remove RTEMS_POSIX_API from BSP config 2022-06-22 17:35:50 +02:00
Sebastian Huber
c935f1def2 build: Do not require RTEMS_POSIX_API 2022-06-22 17:25:12 +02:00
Sebastian Huber
da3551ad94 netstat: Do not use signals 2022-06-22 17:25:12 +02:00
Sebastian Huber
60986c25e0 wlanstats: Do not use signals 2022-06-22 17:25:12 +02:00
Sebastian Huber
c178af7dfa ping6: Do not use signals 2022-06-22 17:25:12 +02:00
Sebastian Huber
04564e61c6 ping: Do not use signals 2022-06-22 17:25:12 +02:00
Sebastian Huber
86d6b72349 openssl: Do not use signals 2022-06-22 17:25:12 +02:00
Sebastian Huber
204790a525 wpa: Use CONFIG_ELOOP_KQUEUE
This avoids issues with the fd_set size.
2022-06-22 17:25:12 +02:00
Sebastian Huber
ef338b80c0 wpa: Do not use signals 2022-06-22 17:25:12 +02:00
Sebastian Huber
44e06dada2 ipsec-tools: Do not use signals 2022-06-22 17:25:12 +02:00
Sebastian Huber
31e3906ed4 racoon: Do not rely on <sys/types.h> 2022-06-22 17:25:12 +02:00
Sebastian Huber
0761774abd Revert white space changes 2022-06-22 17:25:12 +02:00
Chris Johns
c56a34f547 freebsd/nfsv4: Fix misaligned 64bit user dirent write 2022-06-20 13:04:11 +10:00
Sebastian Huber
26963fa0cd nfs01: Fix warnings 2022-06-10 08:06:42 +02:00
Sebastian Huber
2e696c6232 CONTRIBUTING.rst: Warn about white space changes 2022-06-09 08:40:16 +02:00
Sebastian Huber
dba9346b43 uma_core.c: Fix use of uninitialized variable
Update #4475.
2022-06-08 15:16:36 +02:00
Christian Mauderer
c9b4bed650 if_ffec: Allow PHY that is connected to other FFEC
The i.MX6UL (and some others from the i.MX family) have shared MDIO
lines for multiple FFECs. This patch allows to use the MDIO interface
from another Ethernet controller.

Note that you have to make sure that the FFECs are initialized in the
right order. Normally that can be done via FDT.
2022-06-07 09:08:04 +02:00
Christian Mauderer
2a6a230e65 if_ffec: Reduce buffer size
Typical embedded systems don't have that much memory. Reduce the buffer
size to something more sensible for the usual type of application.
2022-06-07 09:08:00 +02:00
Sebastian Huber
ed25b390fc Use rtems_task_exit() 2022-06-01 10:34:36 +02:00
Sebastian Huber
61f646d9b9 if_atsam: Recover from receive freezes
Under unknown conditions the receive path ended up in a frozen state.
In this state, the DMA and driver descriptor head were equal and all
receive descriptors had the used bit set.  So, the DMA was unable to
store received frames.  However, the receive daemon was never woken up
to refill the receive buffers.  It seems that the RXUBR interrupt can be
used to recover from this state.

Update #4652.
2022-06-01 09:57:56 +02:00
Sebastian Huber
8588e9542e if_atsam: Shorten sysctl names
Update #4652.
2022-06-01 09:57:53 +02:00
Sebastian Huber
bd56cb2e59 if_atsam: Add tx/rx desc sysctls
Update #4652.
2022-06-01 09:57:50 +02:00