775 Commits

Author SHA1 Message Date
Sebastian Huber
4ad09617d0 if_atsam: Support transmit bpf
Update #4652.
2022-05-11 15:49:05 +02:00
Sebastian Huber
989675ee7c if_atsam: Do not use rtems_bsdnet_newproc()
Update #4652.
2022-05-11 15:49:04 +02:00
Sebastian Huber
821bcb7345 if_atsam: Support IFCAP_VLAN_HWTAGGING
This is required to enable checksum offload for vlan interfaces.

Update #4652.
2022-05-11 15:49:04 +02:00
Sebastian Huber
967613fbce if_atsam: Optimize receive
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.
2022-05-11 15:49:04 +02:00
Sebastian Huber
2cb974fa20 if_atsam: Optimize transmit
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.
2022-05-11 15:49:04 +02:00
Sebastian Huber
c944cb9325 if_atsam: Add multicast support
Update #4652.
2022-05-11 15:49:04 +02:00
Sebastian Huber
1230011435 if_atsam: Fix start/stop of interface
Update #4652.
2022-05-11 15:49:04 +02:00
Sebastian Huber
975916a75d if_atsam: Fix interrupt setup
The interrupt is enabled by rtems_interrupt_handler_install().

Update #4652.
2022-05-11 15:49:04 +02:00
Sebastian Huber
adda3a5a6d if_atsam: Do not disable the Ethernet CRC
The Ethernet CRC and padding must be always generated by the MAC.

Update #4652.
2022-05-11 15:49:04 +02:00
Sebastian Huber
7e082f6656 if_atsam: Enable all capabilities
Update #4652.
2022-05-11 15:49:04 +02:00
Sebastian Huber
2556c4c336 if_atsam: Fix warnings
Update #4652.
2022-05-11 15:49:04 +02:00
Sebastian Huber
f62a9f15e3 ttcp: Avoid namespace pollution
The global err() function broke a lot of other commands.
2022-05-11 15:21:34 +02:00
Alex White
40b9c6ce63 if_xae: Port to RTEMS 2022-03-07 17:04:05 -06:00
Heinz Junkes
de0badf2c3 if_mve: Add MV643XX Ethernet driver
Update #4345.
2022-03-07 10:52:52 +01:00
Sebastian Huber
4895323e6c rtems-bsd-program.h: Remove stray ';' 2022-02-23 15:57:06 +01:00
Christian Mauderer
17ac5a8cfe ppp: Fix transmitting data
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.

Fixes #4493
2022-02-10 09:19:06 +01:00
Chris Johns
25a883272a Add support for Xilinx Versal APAC 2021-10-21 11:29:14 +11:00
Chris Johns
87a5b45564 rtemsbsd/nfsclient: Fix the error code return value 2021-10-21 11:29:01 +11:00
Chris Johns
f94a67a68d rtemsbsd: Clear bus DMA memory a byte at a time
- memset may be optimized for performance and might work
  with device type memory. Clear a byte at a time.
2021-10-21 11:23:30 +11:00
Kinsey Moore
38f3de6469 rtemsbsd/atomic: Return a value for CMPSET
When the cmpset and fcmpset functions were refactored, the return value
of the operation was discarded instead of being returned for SMP builds
outside of gcc 4.x. This had the effect of turning these functions into
a long busywait loop that eventually failed due to integer overflow.

This patch restores the use of the return value of the atomic
operations.
2021-10-08 09:05:05 -05:00
Chris Johns
2e5f808b09 rtemsbsd/syscalls: Remove pipe()
- This call is provided by RTEMS and that is preferred

Closes #4518
2021-09-23 15:42:12 +10:00
Chris Johns
d9dd59d9ef rtemsbsd/open: Correctly open a mount directory
- If the open is for a directory and it is the root of the mounted
  file system open from the pseudo's root node.
2021-09-23 13:31:08 +10:00
Christian Mauderer
b7c51ac449 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 09:19:27 +02:00
Chris Johns
7e282d2506 rtemsbsd/nfs: Add support to mount NFSv2
- NFSv2 requires userland RPC calls to determine the version of
  NFS and the FH. This is passed to the kernel.

- Port more libc/rpc.

Update #4475
2021-09-02 08:45:12 +10:00
Chris Johns
882425fe54 kern/sys: Add NFSv4 client
Update #4475
2021-08-31 18:38:48 +10:00
Chris Johns
c6dbc96748 kern/sys: Add the kernel RPC and XDR support
Updates #4475
2021-08-28 10:25:46 +10:00
Chris Johns
6514d56158 sys/kern: Add VFS support
- Refactor the libio interface

- Move syscalls into an rtemsbsd location

- Provide a root directory mount point

Update #4475
2021-08-28 10:25:46 +10:00
Chris Johns
ac4db4cec5 rtemsbsd: Remove DHCP init wrapper
- Object files cannot config init and resided in libbsd.a

Update #4475
2021-08-28 10:24:38 +10:00
Chris Johns
e56b5cb135 kern: Add kernel trace support (KTR)
Update #4475
2021-08-28 10:24:38 +10:00
Chris Johns
c7427fc154 kern: Add a proc0
- Provides the thread's proc pointer and with that access to creds

Update #4475
2021-08-28 10:24:38 +10:00
Chris Johns
46a15fa7aa sys/kern: Add lockmgr support
- See `man lockmgr`

- Implement the lock_object and move the RTEMS mutex to that object

- Add debug support to track the locks with gdb

Update #4475
2021-08-28 10:24:38 +10:00
Chris Johns
2a01430ba5 rtemsbsd: Catch timeout overflows
Update #4475
2021-08-28 10:24:37 +10:00
Chris Johns
974742defc kern-symbols: Add symbols from the everything build set
Update #4475
2021-08-28 10:24:37 +10:00
Chris Johns
59f652fe88 Implement portable kernel symbol namespace tool
- The script's use of sort proved to not be portable

- No need to check the commits as symbols are only added

- Regenerated kernel header to reset the sort order

Update #4475
2021-08-28 10:24:37 +10:00
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
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
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
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
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
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
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
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
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