276 Commits

Author SHA1 Message Date
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
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
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
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
Sebastian Huber
5eed6acb5f rtems-bsd-cxx: Undefine _GNU_SOURCE
At least the powerpc C++ compiler defines currently _GNU_SOURCE due to a GCC
configuration error.  This leads to conflicting qsort_r() definitions.

As a workaround undefine _GNU_SOURCE for this C++ compatibility test file.

Update #4078.
2020-09-14 17:13:12 +02:00
Sebastian Huber
272d5f522d ifmcstat: Port to RTEMS 2020-09-07 10:12:44 +02:00
Sebastian Huber
bd7e6eeb31 Conditionally include <bsp/linker-symbols.h>
Remove superfluous <bsp.h> include.
2020-08-05 15:04:48 +02:00
Christian Mauderer
5e3780023c busdma: Don't sync nocache memory on ARM
The busdma shouldn't try to flush or invalidate cache in a nocache area.
2020-07-29 13:09:11 +02:00
Christian Mauderer
cdd6003eb8 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 13:09:11 +02:00
Sebastian Huber
26866d2c1f Fix linker errors with minimal build set 2020-07-08 10:21:20 +02:00
Sebastian Huber
afaeccc05a NVMECONTROL(8): Port to RTEMS
Update #3821.
2019-11-13 13:22:36 +01:00
Sebastian Huber
4a6660cee0 Fix pgsigio() warnings 2019-09-25 09:25:06 +02:00
Sebastian Huber
bd6b20c0e6 nexus: Avoid NULL pointer access 2019-09-23 10:13:29 +02:00
Sebastian Huber
d1c8a7fbf5 Add wrapper for strndup() 2019-09-11 10:25:04 +02:00
Nils Hölscher
fd86c091b9 rtems/rtems-kernel-nexus.c: LibBSD init now uses all pass levels.
I observed all Modules loading in the last fdt pass.
The reason was, nexus bus loading with BUS_PASS_DEFAULT.
2019-08-12 08:13:11 +02:00
Sebastian Huber
312f705d4f EPOCH(9): Add epoch_drain_callbacks() 2019-07-09 13:56:23 +02:00
Sebastian Huber
ed1a63384b EPOCH(9): Avoid inline functions
FreeBSD changed the epoch_enter() and epoch_exit() inline functions into
proper functions after a performance analysis to avoid code bloat.
2019-07-09 13:37:34 +02:00
Sebastian Huber
660a8835eb SLEEPQUEUE(9): Fix timeout handling 2019-07-05 10:20:47 +02:00
Sebastian Huber
8f12ed3824 Add RTEMS-specific getcredhostuuid() 2019-06-05 14:15:57 +02:00
Sebastian Huber
b5f8d4831d Use _SMP_Unicast_action()
It is a bit more efficient.
2019-05-21 07:40:53 +02:00
Sebastian Huber
a87e0f4f5c Update due to API changes
Close #3749.
2019-05-15 15:45:03 +02:00
Sebastian Huber
edc4bf9f71 Separate libbsd and RTEMS clock ticks 2019-05-15 13:43:49 +02:00
Sebastian Huber
510d1c96f6 Include missing <stdlib.h> to fix warnings 2019-05-15 13:43:46 +02:00
Sebastian Huber
061e27912c Remove unused maxusers 2019-05-15 13:43:44 +02:00
Sebastian Huber
0a8c0ce47f Remove dangerous weak definition of getentropy()
All BSP supporting libbsd should provide this function.
2019-05-15 13:43:41 +02:00
Sebastian Huber
49c75e331e Use static inline functions for jail and prison
This helps the compiler to optimize away dead code.
2019-05-13 09:34:01 +02:00
Sebastian Huber
6e5c632248 Fix zero-copy mbuf support
In 2017 there was a change in the mbuf API.
2019-05-13 09:34:00 +02:00
Sebastian Huber
647dd08ae2 Update due to API changes 2019-04-11 09:38:45 +02:00
Christian Mauderer
9ed6c97139 bin/openssl: Port to RTEMS. 2019-03-28 07:17:24 +01:00
Sebastian Huber
5f68b005f2 Remove unused file 2019-03-11 07:15:01 +01:00
Sebastian Huber
3e483fb445 Build C++ kernel-space compatibility file 2019-02-18 10:09:58 +01:00
Sebastian Huber
34cb55db70 Fix INVARIANTS support 2019-01-22 13:24:26 +01:00
Sebastian Huber
d7c7d6e256 Fix locking issue in epoch_sysinit()
The _Watchdog_Per_CPU_insert_ticks() assumes that interrupts are
disabled.
2018-12-20 10:33:34 +01:00
Sebastian Huber
e0b4edbdcc Update to FreeBSD head 2018-11-15
Git mirror commit a18b0830c4be01b39489a891b63d6023ada6358a.

Update #3472.
2018-11-15 10:56:14 +01:00
Sebastian Huber
9f2c3ceebe Fix locking issue in epoch_watchdog()
The _Watchdog_Per_CPU_insert_ticks() assumes that interrupts are
disabled.
2018-11-15 08:26:49 +01:00
Sebastian Huber
9f87c4586b Include missing <sys/types.h>
Update #3598.
2018-11-13 10:17:48 +01:00
Sebastian Huber
91327bd82a Use global stdout for kernel output and syslog() 2018-10-10 14:20:42 +02:00
Sebastian Huber
f949b432de Fix syslog() priority handling
Ths syslog priority is a mask not a level.
2018-10-10 14:20:06 +02:00
Sebastian Huber
b42dea9e51 CONFIG_INTRHOOK(9): Port to RTEMS
Some device drivers (e.g. MMC) need a complex intialization with working
callouts.  Remove the dummy CONFIG_INTRHOOK() implementation and replace
it with the real one from FreeBSD.  Make sure TIMEOUT(9) services work
at this point.

Update #3525.
2018-09-25 10:01:15 +02:00
Sebastian Huber
3489e3b639 Update to FreeBSD head 2018-09-17
Git mirror commit 6c2192b1ef8c50788c751f878552526800b1e319.

Update #3472.
2018-09-21 10:29:41 +02:00
Sebastian Huber
bcdce02d9b Update to FreeBSD head 2018-06-01
Git mirror commit fb63610a69b0eb7f69a201ba05c4c1a7a2739cf9.

Update #3472.
2018-09-21 10:29:41 +02:00
Sebastian Huber
18fa92c2dc Update to FreeBSD head 2018-02-01
Git mirror commit d079ae0442af8fa3cfd6d7ede190d04e64a2c0d4.

Update #3472.
2018-09-21 10:29:39 +02:00
Sebastian Huber
bb80d9df8b Update to FreeBSD head 2017-12-01
Git mirror commit e724f51f811a4b2bd29447f8b85ab5c2f9b88266.

Update #3472.
2018-09-21 10:29:38 +02:00
Sebastian Huber
c37f9fba70 Update to FreeBSD head 2017-08-01
Git mirror commit f5002f5e5f78cae9f0269d812dc0aedb0339312c.

Update #3472.
2018-09-21 10:29:37 +02:00
Sebastian Huber
08fbf18141 Initialize interrupt server earlier
This allows to initialize other basic services which depend on the
interrupt server.
2018-09-12 08:09:38 +02:00
Sebastian Huber
6e5b088e8f Move dynamic mutex pool to separate file
This avoids false link-time dependencies.
2018-09-12 07:59:27 +02:00
Sebastian Huber
f56067e26c vprintf: Avoid printf() to avoid FPU usage 2018-09-10 15:15:42 +02:00
Christian Mauderer
028bf82f6d rc.conf: Fix cloned interface setup.
The cloned interfaces have to be set up befor the interface list is
created. Otherwise it's not possible to configure a cloned interface
with a `ifconfig_gifX` line.
2018-08-02 10:32:24 +02:00