2064 Commits

Author SHA1 Message Date
Chris Johns
f5c405ec05 bsp/motorola_powerpc: Add dc and ukphy support
- Add the dc net dev to the BSP

- Add the ukphy support

Closes # 4246
2021-08-28 10:23:41 +10:00
Chris Johns
efd75d2e35 testsuite: Wait for the link to be UP
- Wait for a slow PHY to bring the link UP. If the IP address is
  static the test can start before the link is up and the test
  fails.

- Make 2 tests wait. Others will need to be added.
2021-08-27 17:04:30 +10:00
Chris Johns
45ff774c3c rtemsbsd: Add interface support routines
- Add the ability to check if an interface is up
2021-08-27 17:02:59 +10:00
Chris Johns
3f1e128488 rtemsbsd/bus: Add PCI support to the nexus bus
- Add PCI IO region support

- Add support map buffers to PCI address space

- Add BSP conditional IO space support. Some PC implementations
  have PCI IO space mapped differently to memory space and this needs
  to be reflected in the busspace.

- Include bsp.h to pick per BSP configuration.

Closes #4245
2021-08-27 16:53:41 +10:00
Joel Sherrill
c5e81a2169 linker_set.h: Add alignof implementation for when not C11 or C++11
The default implementation was completely broken. Use the GCC specific
__alignof__ if compiling for C99 or C++03. If not C++11, C11, or
GCC, then it is an error.
2021-07-21 17:00:22 -05:00
Stephen Clark
c41318075e nexus: Added SDHCI driver to ZynqMP
Made ZynqMP build with the SDHCI driver.
2021-07-15 11:29:09 -05:00
Kinsey Moore
a53aeb5eb9 rtemsbsd: Present all ZynqMP interfaces by default
Now that the issue with false PHY detection on unterminated MII busses
has been resolved, present all hardware interfaces for use on ZynqMP.
2021-07-15 10:07:16 -05:00
Kinsey Moore
14576608a9 freebsd/if_cgem: Fail probe for unterminated MII
When the MII bus is unterminated on unused interfaces, it results in PHY
read timeouts which manifest as spurious PHYs during the attach call.
Detect these timeouts during the probe so the device can be ignored.
2021-07-15 10:07:16 -05:00
Kinsey Moore
b0c8153d54 rtemsbsd: Use config.inc to control ZynqMP ethernet
This alters the selection of the 4 Cadence GEM interfaces on the Zynq
Ultrascale+ MPSoC BSP to be provided by config.inc instead of being
provided by options in the RTEMS BSP itself since those options appear
to be dead code when not used in conjunction with LibBSD.
2021-07-01 10:33:39 -05:00
Stephen Clark
8dfea31d72 rtemsbsd: Added a test for the TTCP command.
Added a new test for the TTCP command. Modified default-network-init.h
to conditionally build the shell with TTCP. Modified libbsd.py to build
the new TTCP test.
2021-06-29 16:03:42 -05:00
Stephen Clark
6cc63cbe65 rtemsbsd: Made TTCP command build for RTEMS
Updated ttcp.c to build clean for RTEMS 6 and the machines it
originally built for. Also fixed ttcp.c to close network
sockets after completion. Defined a shell command for TTCP in
rtems-bsd-shell-ttcp.c. Added TTCP to the list of RTEMS network
commands in netcmds-config.h. Added declaration of the TTCP shell
command to rtems-bsd-commands.h. Modified libbsd.py to make waf
build TTCP and its shell command.
2021-06-29 16:03:42 -05:00
Stephen Clark
7960ab7a43 rtemsbsd:Updated TTCP code with network demo code
Updated the TTCP code to match the ttcp.c in RTEMS network-demos
repository (https://git.rtems.org/network-demos/).
2021-06-29 16:03:42 -05:00
Stephen Clark
af06b267c5 rtemsbsd: Added original TTCP code
Added the original Test TCP (TTCP) program in unmodified form.
Also added the original README for TTCP. Both the README and the
TTCP program were sourced from the first commit in the RTEMS
network demos repository.
2021-06-29 16:03:42 -05:00
Kinsey Moore
4ce914cb90 rtemsbsd: Make ZynqMP CGEM interfaces selectable
Use the new options from the ZynqMP BSPs to allow selection of the
available CGEM ethernet interfaces.
2021-06-28 09:15:13 -05:00
Christian Mauderer
400dcc41d7 builder.py: Only disable tests if they are there
For checking the dependencies, the tests are removed. But if the tests
are not enabled at all, that triggers a python exception.
2021-06-16 11:34:19 +02:00
Christian Mauderer
2c8bbde1dc racoon: Fix build with current toolchain
During some newlib version, the _types_fd_set has been replaced with
just fd_set.
2021-06-16 11:34:10 +02:00
Sebastian Huber
ec8eaccc62 README: Mention SMP requirements 2021-06-16 07:39:16 +02:00
Sebastian Huber
158c270ded EPOCH(9): Fix epoch call and drain
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.
2021-06-15 18:46:08 +02:00
Sebastian Huber
cb94a7443d EPOCH(9): Use PER_CPU_DATA_NEED_INITIALIZATION()
Use the PER_CPU_DATA_NEED_INITIALIZATION() macro if necessary to request an
initialization of the per-CPU data.
2021-06-11 08:46:37 +02:00
Jan Sommer
974ab1568a i386: Remove unneeded include header files 2021-06-09 18:47:07 +02:00
Jan Sommer
1ca0dc7309 waf_libbsd.py: Apply path-mappings to header-paths 2021-06-09 18:46:27 +02:00
Ryan Long
34862dd273 libbsd nfs.c: Change filesystem utime_h handler to utimens_h
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
2021-05-28 16:32:42 -05:00
Christian Mauderer
e5d5e097de ipsec-tools/pfkey: Fix socket leak
setkey uses pfkey_open to open a socket. But setkey doesn't close the
socket.

The libipsec functions are used only by user space applications (setkey
and racoon). Adding the wrapper for socket makes sure that the opened
socket is registered and closes if the application exits.

Fixes #4405
2021-05-11 08:43:42 +02:00
Christian Mauderer
b1ecc253ee st-sdmmc: Handle short not cache aligned buffers
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.
2021-04-19 09:02:30 +02:00
Christian Mauderer
00a5f9748e 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:02:22 +02:00
Christian Mauderer
aef7a74b94 STM32H7: Fix SDMMC build for all other BSPs 2021-04-01 16:04:44 +02:00
Christian Mauderer
e0fcb31f01 STM32H7: Add SDMMC driver
Update #4372
2021-04-01 09:05:13 +02:00
Christian Mauderer
2caeaafb92 testsuite/media01: Add pattern test
Update #4372
2021-04-01 09:05:05 +02:00
Christian Mauderer
43ae62ed7f testsuite/media01: Enable md5 command
Update #4372
2021-04-01 09:04:54 +02:00
Christian Mauderer
33e3cf8eaf ping6: Honor file descriptor maximum
This is basically the same as the patch for ping.

Update #4360
2021-03-26 14:08:01 +01:00
Christian Mauderer
e7fb073f3a racoon/session: Honor file descriptor maximum
Dynamically allocate a big enough file descriptor set for select(). A
better solution would be to use kqueue() instead of select().

Update #4360
2021-03-26 14:08:01 +01:00
Kinsey Moore
023e94fd8b nexus: Add UKPHY driver to ZynqMP
ZynqMP hardware comes with many different Ethernet PHYs depending on
which board is used. Add the UKPHY driver to handle basic PHY
interaction for any unrecognized PHYs.
2021-03-10 08:57:59 -06:00
Kinsey Moore
3abebabf1d linker: Enforce set alignment requirements
According to commentary on GCC bug
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99143, the alignment
behavior of linker sections on which RTEMS has relied was never
guaranteed to be consistent across platforms and any alignment
requirements for linker sections needs to be enforced explicitly.
This adds those explicit alignment requirements.
2021-03-10 08:57:59 -06:00
Kinsey Moore
28129f8ee6 ck: Update for ILP32
libck assumes all AArch64 pointers are 8 bytes. This adds the required
defines to handle 4 byte pointers on ILP32.
2021-03-10 08:57:59 -06:00
Kinsey Moore
e256668d6e nexus: Add ZynqMP SLCR driver
Add a System Level Control Register driver for the Xilinx Zynq
Ultrascale+ MPSoC with basic clock control functionality for use with
the Cadence GEM. This also removes the Zynq-7000 clock control weakref
from compilation depending on the BSP in use.
2021-03-10 08:57:59 -06:00
Kinsey Moore
1d9f93cbaa nexus: Switch ZynqMP platforms to CGEM3
Similar to the UARTs, ZynqMP hardware platforms use the highest
memory-mapped CGEM peripheral as the primary instance of that
peripheral. This change allows operation on hardware as well as QEMU.
2021-03-10 08:57:59 -06:00
Kinsey Moore
b7a12cc8f9 if_cgem: Add support for ZynqMP CGEM
This is a port of the latest patch in FreeBSD that adds support for
64bit CGEMs as used in ZynqMP. This does not include the work necessary
for support on RISC-V systems.
2021-03-10 08:57:59 -06:00
Kinsey Moore
0c60fe524e rtembsd: Fix alignment of allocations for 64bit
Alignment on 64bit hardware is strict in comparison to running in an
emulator. This resolves an alignment exception when allocating memory on
real hardware.
2021-03-10 08:57:59 -06:00
Moyano, Gabriel
5b50a5181a ehci_pci: Add to build system
Closes #4264
2021-03-08 18:08:12 +01:00
Moyano, Gabriel
7abb8915d7 ehci_pci: Import from freebsd-org
see #4264
2021-03-08 18:07:46 +01:00
Kinsey Moore
68e79b6d18 zynq: Add support for SDHCI devices 2020-12-22 16:12:58 -06:00
Kinsey Moore
0ad342ae5f Add CGEM definitions for ZynqMP 2020-11-24 08:50:07 -06:00
Christian Mauderer
a58f553e9d 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-17 11:33:23 +01:00
Christian Mauderer
9cd28904cf imxrt: Add support
Update #4180
2020-11-17 11:33:01 +01:00
Kinsey Moore
19d98d3a19 Update arm64/aarch64 support 2020-11-13 12:33:17 -06:00
Sebastian Huber
9ebb4e2025 dwc_otg: Enable voltage detector
Update #3910.
2020-10-27 06:29:39 +01:00
Sebastian Huber
0e7108f940 dwc_otg: Add support for nexus bus
Update #3910.
2020-10-27 06:29:37 +01:00
Sebastian Huber
8c4c7807f5 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:29:29 +01:00
Sebastian Huber
1189f7147a if_stmac: Add driver for STM32H7 ethernet module
Update #3910.
2020-10-27 06:28:47 +01:00
Sebastian Huber
06896e4842 NVD(4): Fix logical block count calculation
Update #4164.
2020-10-27 06:26:34 +01:00