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.
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
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
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
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
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.
Do not use the interface mutex in the receive loop. Avoid multiple
reads of DMA descriptor words. Use a compile-time constant for the
receive DMA descriptor count to simplify calculations.
Update #4652.
Use the transmit interface handler to avoid a transmit task/interrupt.
Use a compile-time constant for the transmit DMA descriptor count to
simplify calculations.
Update #4652.
The pppstart expected that a driver write would somehow magically
process all data passed to the write function. Because ppp disables all
buffering that originally has been in termios, that assumption is not
true for all but polled drivers.
With this patch, the pppstart now gets and processes the feedback that
is returned from the driver via rtems_termios_dequeue_characters.
Update #4493
Since the epoch call callbacks may lock/unlock a mutex the callbacks must be
called from within thread context with thread dispatching enabled. Use thread
pinning to ensure that the calling thread stays on the right processor. Use
the interrupt server to ensure the thread context for the epoch drain.
Changed nfs_utime() to nfs_utimens(), changed the arguments to use
a timespec array instead of individual variables for access and
modified time.
Updates #4400
Possible data sources for SD driver:
- mmc_sd_switch():
- length: 64 byte;
- buffer on stack
- mmc_test_bus_width():
- length: 4 or 8 byte
- buffer in program memory or on stack
- mmc_app_send_scr():
- length: 8 byte
- buffer from device ivar structure
- mmc_app_sd_status():
- length: 64 byte
- buffer from device ivar structure
- mmc_send_ext_csd():
- length: MMC_EXTCSD_SIZE = 512
- buffer from device ivar structure
- rtems_bsd_mmcsd_disk_read_write():
- length: depends on read
- buffer from rtems_blkdev buffer -> already aligned
- mmcsd_ioctl_cmd():
- length: depends on call
- buffer malloced, not aligned -> patched in RTEMS
So the problematic buffers are only the ones up to 512 bytes. Copy these data
into a buffer to avoid that problem.
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