Pedro F. Giffuni
26c1d774b5
dev: make some use of mallocarray(9).
...
Focus on code where we are doing multiplications within malloc(9). None of
these is likely to overflow, however the change is still useful as some
static checkers can benefit from the allocation attributes we use for
mallocarray.
This initial sweep only covers malloc(9) calls with M_NOWAIT. No good
reason but I started doing the changes before r327796 and at that time it
was convenient to make sure the sorrounding code could handle NULL values.
2018-01-13 22:30:30 +00:00
Pedro F. Giffuni
4d24901ac9
sys/dev: Replace zero with NULL for pointers.
...
Makes things easier to read, plus architectures may set NULL to something
different than zero.
Found with: devel/coccinelle
MFC after: 3 weeks
2017-02-20 03:43:12 +00:00
Ruslan Bukin
4934834d6b
Allow BERI virtio-platform code to operate with no PIO devices specified.
...
We will use it with Bluespec simulator of CHERI processor for invalidating
caches only.
2015-07-03 14:27:28 +00:00
Ruslan Bukin
1aac28e753
o Switch to use non-mergeable RX buffers to avoid mbuf adjustment needs
...
o Operate with copy of iov as we expect later it was not modified
2015-01-05 16:43:22 +00:00
Ruslan Bukin
2499610b9a
Do not configure Altera PIO device on ARM startup.
...
PIO is a device implemented in soft-core and becomes
available after flashing FPGA only.
2015-01-04 23:14:04 +00:00
Bryan Venteicher
f83577167c
Remove dev/virtio/virtio.h include from BERI VirtIO
...
This header file contains prototypes and defines that only make
sense to the guest VirtIO device drivers.
Reviewed by: br
2014-12-29 00:35:44 +00:00
Ian Lepore
734ba86366
Eliminate a "cast discards qualifiers" warning when building with gcc.
2014-12-21 21:24:19 +00:00
Ruslan Bukin
156b97fa1f
Add virtio bus 'poll' method allowing us to inform backend we are
...
going to poll virtqueue.
Use on BERI soft-core to invalidate cpu caches.
Reviewed by: bryanv
Sponsored by: DARPA, AFRL
2014-12-12 11:19:10 +00:00
Ruslan Bukin
a8098016f1
o Add BERI Virtio Networking Frontend (if_vtbe)
...
o Move similar block/networking methods to common file
o Follow r275640 and correct MMIO registers width
o Pass value to MMIO platform_note method.
Sponsored by: DARPA, AFRL
2014-12-09 16:39:21 +00:00
Ruslan Bukin
e8cf387c51
o Add PIO and vtblk mmio device info to the tree
...
o Add FPGA memory window to static dev mappings
o Fix whitespace
2014-11-25 16:06:19 +00:00
Ruslan Bukin
13e19fb323
Add BERI-specific virtio block backend device driver.
...
This part intended to operate on ARM side in heterogeneous
(ARM/BERI) system on crystal.
2014-11-25 15:58:59 +00:00
Ruslan Bukin
1230159bc7
Add BERI-specific virtio mmio "platform" device.
...
This device provides a connector to Altera PIO allowing us
to interrupt software-implemented virtio mmio backend.
Sponsored by: DARPA, AFRL
2014-11-19 14:49:29 +00:00
Ruslan Bukin
2d3f1b38a9
Provide a character device allowing us to access BERI memory regions.
...
Sponsored by: DARPA, AFRL
2014-10-22 11:30:03 +00:00
Ruslan Bukin
b0da449e60
Add driver for BERI soft processor 'ring buffer' device.
...
Ring device provides a way for communicate to BERI
peripherals such as BERI debug unit and console.
Sponsored by: DARPA, AFRL
2014-10-19 16:26:49 +00:00