2142 Commits

Author SHA1 Message Date
Kinsey Moore
388d46bb1b rtemsbsd: Remove old DHCP init prototype
This prototype should have been removed with commit
ac4db4cec5b6b1e0a25e910851e50831afb0749d.
2024-03-26 16:31:59 -05:00
Kinsey Moore
f980e47f88 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:51:03 -06:00
Kinsey Moore
3a9f9c6c70 rtemsbsd: Remove unused variable 2024-01-31 14:00:17 -06:00
Kinsey Moore
c05a6f545b rtemsbsd/arasan_sdhci: Move variable init to start
This moves the ZynqMP-specific variable initialization to the start of
the function to avoid Coverity warnings.
2024-01-31 14:00:17 -06:00
Kinsey Moore
26ddd7dfca rtemsbsd/rtems: Don't leak memory on error 2024-01-31 14:00:17 -06:00
Kinsey Moore
62e0ca8283 rtemsbsd/rtems: Check function return values 2024-01-31 14:00:17 -06:00
Kinsey Moore
2d4e4bece3 rtemsbsd/rc-conf: Avoid use after free 2024-01-31 14:00:17 -06:00
Christian Mauderer
77ce52a89a testsuite: Add a VME test
Note: This test currently only works with a board with a Tsi148 like the
MVME2500. For other boards it will print only a message.
2024-01-31 09:55:59 +01:00
Christian Mauderer
b7e626109c tsi148: Add an RTEMS VME glue layer
The glue layer provides the necessary function so that the Tsi148 driver
in the BSP can use the PCI functionality from libbsd.
2024-01-31 09:55:59 +01:00
Sebastian Huber
eb7bc09b3b Add Tsi148 driver template 2024-01-31 09:55:59 +01:00
Christian Mauderer
97962443ee pci_mpc85xx: Ensure access order for config-regs
The CFG_ADDR has to be written before reading or writing the CFG_DATA.
2024-01-31 09:55:59 +01:00
Sebastian Huber
42add0b7f1 Enable kernel space pci_find_device() 2024-01-31 09:55:59 +01:00
Sebastian Huber
e9acd95722 pci_mpc85xx.c: Disable reset during initialization 2024-01-31 09:55:59 +01:00
Sebastian Huber
557f2cc97c mpc85xx: Support P20XX Local Access Window regs 2024-01-31 09:55:59 +01:00
Sebastian Huber
0e2d6b8819 Enable NEW_PCIB 2024-01-31 09:55:59 +01:00
Sebastian Huber
398c5f6952 Include missing header file 2024-01-31 09:55:59 +01:00
Sebastian Huber
2e96ed7562 Add pic_if.m 2024-01-31 09:55:59 +01:00
Sebastian Huber
acb80d6e0a pci: Back port changes 2024-01-31 09:55:59 +01:00
Sebastian Huber
17a3184081 mpc85xx: Port to RTEMS 2024-01-31 09:55:59 +01:00
Sebastian Huber
1e81e38a30 mpc85xx: Import from FreeBSD 2024-01-31 09:55:59 +01:00
Sebastian Huber
3c9c9f19ba sys/bus.h: Fix for small-data area targets 2024-01-31 09:55:59 +01:00
Chris Johns
1524f95e93 i386/pc686: Fix kernel bus DMA for the PC686 BSP
The x86 provides it own bus space support. Use the generic
bus space calls. This however requires the BUS_SPACE_MEM tag
be provided for all architectures. Make the generic value
match the x86 value.
2023-10-04 16:13:45 +11:00
Kinsey Moore
f0fe0439c4 rtemsbsd/libio: Handle invalid descriptors
The documentation for this function suggests that it can handle invalid
descriptors safely. This change allows negative descriptors to be
handled without a crash.
2023-09-20 15:50:25 -05:00
Chris Johns
7cc487f2d3 rtemsbsd/vfs: Use VOP_REMOVE to remove file nodes 2023-08-07 07:58:30 +10:00
Chris Johns
afc6ad0525 testsuite/nfs: Check the path returned by getcwd 2023-08-06 15:49:31 +10:00
Chris Johns
fdde806c50 rtemsbsd/syscall: Set unitialised variable in open
The open path length was not set when at the root node and this
sometimes failed the current directory checks.
2023-08-06 15:45:21 +10:00
Chris Johns
f55a3dd32f nfs: Support multiple mounts with the same path basename
NFSv4 mounts NFS file systems to the flat root of a pseudo file
system. This change allow the same basename to be used.
2023-07-21 14:56:02 +10:00
Chris Johns
1dfdee9ce9 freebsd/vfs: Pass in the td's cred to the VFS calls
Closes #4723
2023-07-21 14:56:02 +10:00
Chris Johns
65913f4b3b syscall/open: Reference the path info directory vnode
The kernel open call requires a path so to open a file we need to
set the current directory to the parent vnode. If the open mode is
create the path info vnode is the directory to perform the open
create in. Using the parent node creates the file in wrong path.

Updates #4723
2023-07-21 14:56:02 +10:00
Chris Johns
60e40e9b83 freenbsd/vfs: VFS attributes need to have the same size mode_t variable
If the size in the attributes struct does not match the mode_t the
VNOVAL checks fail because size of the values are not the same.

Updates #4723
2023-07-21 14:55:50 +10:00
Kinsey Moore
c8e1d6dbc4 freebsd/if_cgem: Remove QEMU workaround
This removes the workaround applied on the fly for QEMU that disables
priority queueing. The priority queue interrupt was not previously
hooked up properly in QEMU and RSB now has the patches to allow it to
work.
2023-06-28 08:04:03 -05:00
Aaron Nyholm
5de608c582 rtemsbsd/versal_slcr: Fix Versal GEM clock set 2023-06-20 10:16:10 +10:00
Christian Mauderer
8ed211f4a1 ipsec-tools: Fix copying fd_set prior to select
The racoon session code copies an fd_set from one variable into another
prior to calling select. That works well for simple structures.

In libbsd we have to allocate fd_sets instead of using fixed structures
to avoid a problem with file numbers bigger than FD_SETSIZE. The simple
assignment didn't work in that case.

This patch makes sure that a memcpy is used instead.

Update #4913
2023-05-31 08:23:12 +02:00
Kinsey Moore
01b04a01da Revert "waf: Move the tools/BSP include path to be last"
This reverts commit 6ee31ae968323c71c478b2f52ec5a5cbff8c8f5d.

A fix has been committed to RTEMS pkgcfg and Makefile generation to
handle this issue and having this in place with the fix in RTEMS causes
a failure to build.
2023-05-02 08:31:04 -05:00
Aaron Nyholm
7170d1ed14 rtemsbsd/rc_conf: Fixed non-nullterminated string causing crashes 2023-04-13 09:35:19 +10:00
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