843 Commits

Author SHA1 Message Date
Kinsey Moore
beb423ba5b freebsd/mmcsd: Disable on-device cache usage
This disables any usage of the on-device R/W cache since all device
cache maintenance functions are compiled out under RTEMS leaving no way
to flush the cache before system reset and making data loss possible.
2024-03-05 08:50:46 -06:00
Stefan Eßer
31808093e1 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:20:55 +02:00
Sebastian Huber
d6b8db2f2f stdio/local.h: Make Newlib config independent 2022-07-24 14:54:03 +02:00
Sebastian Huber
0cd30949fc netstat: Do not use signals 2022-06-22 17:27:11 +02:00
Sebastian Huber
e583f152b4 wlanstats: Do not use signals 2022-06-22 17:27:11 +02:00
Sebastian Huber
217c2e2a8b ping6: Do not use signals 2022-06-22 17:27:09 +02:00
Sebastian Huber
4ca39ca3fc ping: Do not use signals 2022-06-22 17:25:58 +02:00
Sebastian Huber
cdb5ac55c6 openssl: Do not use signals 2022-06-22 17:25:58 +02:00
Sebastian Huber
93519fa764 wpa: Use CONFIG_ELOOP_KQUEUE
This avoids issues with the fd_set size.
2022-06-22 17:25:58 +02:00
Sebastian Huber
dd3f119d3b wpa: Do not use signals 2022-06-22 17:25:58 +02:00
Christian Mauderer
f5e9bae508 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:07:15 +02:00
Christian Mauderer
91afe3a020 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:07:08 +02:00
Sebastian Huber
15bcf12ffa libc: Include <sys/types.h> for RTEMS
This fixes an issue with a recent Newlib which no longer includes <sys/types.h>
in <stdio.h>.
2022-05-18 09:48:35 +02:00
Sebastian Huber
453ff00b5b libc: Avoid conflict with Newlib __sinit() 2022-05-18 09:48:33 +02:00
Sebastian Huber
3883871a13 tcpdump: Do not rely on u_char typedef 2022-05-18 09:48:32 +02:00
Sebastian Huber
ae635eb214 pfctl: Fix global state initialization
Update #4654.
2022-05-13 08:47:41 +02:00
Sebastian Huber
5ad77a9a18 tcpdump: Do not use signals and chroot
Close #4650.
2022-05-12 07:48:47 +02:00
Sebastian Huber
32ebbd3767 tcpdump: Ensure loop monitor termination
Update #4650.
2022-05-12 07:48:02 +02:00
Sebastian Huber
c9b44ba907 tcpdump: No loop monitor if reading from file
Update #4650.
2022-05-12 07:48:02 +02:00
Sebastian Huber
011f4894e0 tcpdump: Close pcap dumper at program exit
Update #4650.
2022-05-12 07:48:02 +02:00
Sebastian Huber
6fb7134a91 tcpdump: Use rtems_task_exit()
Update #4650.
2022-05-12 07:48:02 +02:00
Sebastian Huber
479b4de6f1 tcpdump: Make loop monitor cooperative
This helps a bit if the fgetc() is non-blocking.

Update #4650.
2022-05-12 07:48:02 +02:00
Kinsey Moore
19d9fde14a Import arm64 in_cksum.h correctly
When this file was brought in, it came from the wrong location or
freebsd-org hash. This corrects the file such that freebsd-to-rtems.py
runs cleanly.
2021-12-16 08:53:26 -06:00
Christian Mauderer
d36d545d16 imx: Remove ccm functions alredy defined in RTEMS
The imx_ccm_*_hz are all defined in RTEMS. So don't duplicate them in
libbsd. Otherwise some applications get linker errors.

Update #3869
2021-09-02 08:45:31 +02:00
Jan Sommer
5b82fcf06a i386: Remove unneeded include header files 2021-06-07 10:39:46 +02:00
Christian Mauderer
8aa3ddfbd7 MMCSD: Use cache aligned alloc for ioctl
Some drivers can't easily work with buffers that are not cache aligned
and have an arbitrary length. Therefore use an aligned malloc instead.
2021-04-19 09:03:37 +02:00
Christian Mauderer
7afe0ba8f3 ping6: Honor file descriptor maximum
This is basically the same as the patch for ping.

Update #4360
2021-03-26 14:07:06 +01: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
Moyano, Gabriel
b16b47774e ehci_pci: Import from freebsd-org
Updates #4264
2021-03-08 17:46:09 +01:00
Christian Mauderer
33bfaee89a wpa: Fix multiple definition of hmac_md5
hmac_md5 is defined in dhcpcd and in wpa supplicant.
2020-12-14 10:54:37 +01:00
Christian Mauderer
182aac377d if_ffec: Fix cache handling on tx
With the previous fix, it could happen that the end of the packet hasn't
been flushed. For example assume the following addresses:

ds_addr: 0x81c804A
ds_len: 0x57

In that case the data ends at 0x81c80a1. But due to the rounding the
area from 0x81c8040 to 0x81c80a0 would have been flushed.

This fix now first calculates the start and end address, aligns these
addresses and then recalculates the len that has to be flushed.

Update #4180
2020-11-20 08:56:40 +01:00
Kinsey Moore
9f52a0df17 Update arm64/aarch64 support 2020-11-13 12:34:01 -06:00
Sebastian Huber
6c83023331 dwc_otg: Add support for nexus bus
Update #3910.
2020-10-27 06:33:05 +01:00
Sebastian Huber
2237f4b053 dwc_otg: Update host frame interval
Update the host frame interval after a device connection.  Select also
the FS/LS PHY clock.  It is not clear if this works on all platforms.

Update #3910.
2020-10-27 06:33:04 +01:00
Sebastian Huber
ccd05b29c1 Add moxie support 2020-09-23 08:06:51 +02:00
Sebastian Huber
ae1e0c25d8 Add or1k support 2020-09-23 06:34:19 +02:00
Sebastian Huber
0462837404 ck: Use default implementation < ARMv6 2020-09-23 06:34:19 +02:00
Jan Sommer
66019c3e78 i386: Delete old machine dependent files
- The files in the i386 directory have been moved to common x86 directories by FreeBSD:
  - freebsd/sys/i386/include/machine/bus.h
  - freebsd/sys/x86/include/machine/legacyvar.h
  - freebsd/sys/x86/include/machine/specialreg.h
- Add header files in rtemsbsd directory to direct compiler to new files
2020-09-16 15:52:58 +10:00
Jan Sommer
514ffab353 iflib.c: Deactivate use of ifc_cpus
- cpusets and SMP are currently not supported in libbsd for RTEMS
- Disable the ifc_cpus context variable and replace its usage,
essentially hard-coding for cpu 0
2020-09-16 15:52:58 +10:00
Jan Sommer
5cfbb629b6 Callout: Redefine callout_reset_on for rtems
- callout_reset_on takes a cpu which is ignored by the subsequent call
to callout_reset_sbt_on in RTEMS.
- The macro is redefined to discard the cpu argument directly which
enables uses of it with cpu-dependent variables (disabled in
RETMS) without further changes, e.g. in iflib.c.
2020-09-16 15:52:58 +10:00
Jan Sommer
56fd3765e9 e1000: Add missing files 2020-09-16 15:52:58 +10:00
Sebastian Huber
d56d9b6d3b ifmcstat: Port to RTEMS 2020-09-10 13:24:18 +02:00
Sebastian Huber
50056ecbd2 ifmcstat: Import from FreeBSD 2020-09-10 13:23:45 +02:00
Christian Mauderer
4a05b2e41c if_ffec: Align send buffers to cache if necessary. 2020-07-29 11:19:24 +02:00
Christian Mauderer
36b588eb8b rtwn_usb: Make sure buffers are cache aligned 2020-07-29 11:19:14 +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
7e5d93bb6b imx: Use RTEMS GPIO driver instead of FreeBSD one
Update 3869
2020-07-29 11:19:00 +02:00
Christian Mauderer
469cc8fbb7 gpioregulator: Remove.
There is a bug in the #ifdef regarding FDT so this file hasn't been
compiled. If that bug is solved, the driver doesn't work for some other
reason.

With the FDT-bug the driver hasn't been used by anyone. So just remove
it again.
2020-07-29 11:15:42 +02:00
Christian Mauderer
4fad914cee imx6_usbphy: Fix regulator (vbus-supply)
Update #3869.
2020-04-20 09:18:58 +02:00
Christian Mauderer
a6cf310fb2 regulator: Disable FDT parts for non-FDT targets 2020-04-17 14:43:58 +02:00