MFC r343998:Fix off-by-one error in BERI virtio driverThe hardcoded ident is exactly 20 bytes long but sprintf adds terminating zero,so there is one byte written out of array bounds.As a fix use
MFC r343998:Fix off-by-one error in BERI virtio driverThe hardcoded ident is exactly 20 bytes long but sprintf adds terminating zero,so there is one byte written out of array bounds.As a fix use strncpy itappends \0 only if space allows and its behavior matches virtio spec:When VIRTIO_BLK_T_GET_ID is issued, the device identifier, up to 20 bytes, iswritten to the buffer. The identifier should be interpreted as an ascii string.It is terminated with \0, unless it is exactly 20 bytes long.PR: 202298Reviewed by: brDifferential Revision: https://reviews.freebsd.org/D18852
show more ...
Revert r327828, r327949, r327953, r328016-r328026, r328041:Uses of mallocarray(9).The use of mallocarray(9) has rocketed the required swap to build FreeBSD.This is likely caused by the allocation
Revert r327828, r327949, r327953, r328016-r328026, r328041:Uses of mallocarray(9).The use of mallocarray(9) has rocketed the required swap to build FreeBSD.This is likely caused by the allocation size attributes which put extra pressureon the compiler.Given that most of these checks are superfluous we have to choose betterwhere to use mallocarray(9). We still have more uses of mallocarray(9) buthopefully this is enough to bring swap usage to a reasonable level.Reported by: woschPR: 225197
dev: make some use of mallocarray(9).Focus on code where we are doing multiplications within malloc(9). None ofthese is likely to overflow, however the change is still useful as somestatic checke
dev: make some use of mallocarray(9).Focus on code where we are doing multiplications within malloc(9). None ofthese is likely to overflow, however the change is still useful as somestatic checkers can benefit from the allocation attributes we use formallocarray.This initial sweep only covers malloc(9) calls with M_NOWAIT. No goodreason but I started doing the changes before r327796 and at that time itwas convenient to make sure the sorrounding code could handle NULL values.
sys/dev: Replace zero with NULL for pointers.Makes things easier to read, plus architectures may set NULL to somethingdifferent than zero.Found with: devel/coccinelleMFC after: 3 weeks
Allow BERI virtio-platform code to operate with no PIO devices specified.We will use it with Bluespec simulator of CHERI processor for invalidatingcaches only.
o Switch to use non-mergeable RX buffers to avoid mbuf adjustment needso Operate with copy of iov as we expect later it was not modified
Do not configure Altera PIO device on ARM startup.PIO is a device implemented in soft-core and becomesavailable after flashing FPGA only.
Remove dev/virtio/virtio.h include from BERI VirtIOThis header file contains prototypes and defines that only makesense to the guest VirtIO device drivers.Reviewed by: br
Eliminate a "cast discards qualifiers" warning when building with gcc.
Add virtio bus 'poll' method allowing us to inform backend we aregoing to poll virtqueue.Use on BERI soft-core to invalidate cpu caches.Reviewed by: bryanvSponsored by: DARPA, AFRL
o Add BERI Virtio Networking Frontend (if_vtbe)o Move similar block/networking methods to common fileo Follow r275640 and correct MMIO registers widtho Pass value to MMIO platform_note method.Sp
o Add BERI Virtio Networking Frontend (if_vtbe)o Move similar block/networking methods to common fileo Follow r275640 and correct MMIO registers widtho Pass value to MMIO platform_note method.Sponsored by: DARPA, AFRL
o Add PIO and vtblk mmio device info to the treeo Add FPGA memory window to static dev mappingso Fix whitespace
Add BERI-specific virtio block backend device driver.This part intended to operate on ARM side in heterogeneous(ARM/BERI) system on crystal.
Add BERI-specific virtio mmio "platform" device.This device provides a connector to Altera PIO allowing usto interrupt software-implemented virtio mmio backend.Sponsored by: DARPA, AFRL
Provide a character device allowing us to access BERI memory regions.Sponsored by: DARPA, AFRL
Add driver for BERI soft processor 'ring buffer' device.Ring device provides a way for communicate to BERIperipherals such as BERI debug unit and console.Sponsored by: DARPA, AFRL