xdma: Fix another -Wunused-but-set-variable warning previously missedMFC after: 1 week(cherry picked from commit fa5af3219fab0b1640dba02b8201a536171a4ba4)
xdma: Fix -Wunused-but-set-variable warningsMFC after: 1 week(cherry picked from commit d90c3b51cc3a15235054a5823928e8b654697768)
Enter the network epoch in the xdma interrupt handler if requiredby a peripheral device driver.Sponsored by: DARPA, AFRL
Fix a KASSERT since chained mbufs are accepted by the xdma bouncebuffer loader. m_copydata() will copy entire chain to a single buffer.Sponsored by: DARPA, AFRL
Fix xae(4) driver attachement on the Government Furnished Equipment (GFE)riscv cores.GFE cores come with standard DTS file that lacks standard 'dmas ='property, which means xae(4) could not find
Fix xae(4) driver attachement on the Government Furnished Equipment (GFE)riscv cores.GFE cores come with standard DTS file that lacks standard 'dmas ='property, which means xae(4) could not find a DMA controller to use.The 'dmas' property could not be added to the DTS file because theethernet controller and DMA engine parts in Linux are implementedin a single driver.Instead of 'dmas' property the standard Xilinx 'axistream-connected'property is provided, so fallback to use it instead.Suggested by: James Clarke <[email protected]>Reviewed by: James Clarke <[email protected]>Sponsored by: DARPA, AFRL
show more ...
xdma: avoid NULL deref in error caseReported by: Dr Silvio Cesare of InfoSectMFC after: 3 daysSponsored by: The FreeBSD Foundation
Remove unused header.Sponsored by: DARPA, AFRL
o Add support for BERI IOMMU deviceo Add an experimental IOMMU support to xDMA frameworkThe BERI IOMMU device is the part of CHERI device-model project [1]. Ittranslates memory addresses for vari
o Add support for BERI IOMMU deviceo Add an experimental IOMMU support to xDMA frameworkThe BERI IOMMU device is the part of CHERI device-model project [1]. Ittranslates memory addresses for various BERI peripherals modelled insoftware. It accepts FreeBSD/mips64 page directories format and managesBERI TLB.1. https://github.com/CTSRD-CHERI/device-modelSponsored by: DARPA, AFRL
Fix transfers that don't use busdma or bounce buffer (e.g. software dmas).Busdma data loaded by different function (the bug introduced in r349727).Sponsored by: DARPA, AFRL
Negate the logic of XCHAN_CAP_NOBUFS macro and rename it toXCHAN_CAP_BOUNCE.The only application that uses bounce buffering for now is the GovernmentFurnished Equipment (GFE) P2's dma core (AXIDM
Negate the logic of XCHAN_CAP_NOBUFS macro and rename it toXCHAN_CAP_BOUNCE.The only application that uses bounce buffering for now is the GovernmentFurnished Equipment (GFE) P2's dma core (AXIDMA) with its own dedicatedcacheless bounce buffer.Sponsored by: DARPA, AFRL
Don't copy the data from bounce buffer back to the mbuf if channel doesnot use bounce buffering.Sponsored by: DARPA, AFRL
Extract eventfilter declarations to sys/_eventfilter.hThis allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h"in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces hea
Extract eventfilter declarations to sys/_eventfilter.hThis allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h"in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces headerpollution substantially.EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .cfiles into appropriate headers (e.g., sys/proc.h, powernv/opal.h).As a side effect of reduced header pollution, many .c files and headers nolonger contain needed definitions. The remainder of the patch addressesadding appropriate includes to fix those files.LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as required bysys/mutex.h since r326106 (but silently protected by header pollution priorto this change).No functional change (intended). Of course, any out of tree modules thatrelied on header pollution for sys/eventhandler.h, sys/lock.h, orsys/mutex.h inclusion need to be fixed. __FreeBSD_version has been bumped.
xdma(4): Fix invalid pointer use (breaks arm.SOCFPGA build)In xdma_handle_mem_node(), vmem_size_t and vmem_addr_t pointers were passed toan FDT API that emits u_long values to the output parameter
xdma(4): Fix invalid pointer use (breaks arm.SOCFPGA build)In xdma_handle_mem_node(), vmem_size_t and vmem_addr_t pointers were passed toan FDT API that emits u_long values to the output parameter pointer. Thisbroke on systems with both xdma and 32-bit vmem size/addr types (SOCFPGA).Reported by: tinderboxSponsored by: Dell EMC Isilon
o Implement a bounce buffer based on device reserved memory. Grab device reserved physical memory regions from FDT using standard "memory-region" property and use vmem(9) to allocate buffers from
o Implement a bounce buffer based on device reserved memory. Grab device reserved physical memory regions from FDT using standard "memory-region" property and use vmem(9) to allocate buffers from it. The same vmem could be used by DMA engine drivers to allocate memory for DMA descriptors. This is required for platforms that provide uncached memory region reserved exclusively for DMA operations.o Change sleepable sx(9) lock type to non-sleepable mutex(9) since network drivers usually hold mutex during DMA operations. So we don't take sleepable lock after non-sleepable.Tested on U.S. Government Furnished Equipment (GFE) 64-bit RISC-V cores.Sponsored by: DARPA, AFRL
o Rewrite softdma_process_tx() of Altera SoftDMA engine driver so it does not require a bounce buffer. The only need for this was to align the buffer address. Implement unaligned access and we do
o Rewrite softdma_process_tx() of Altera SoftDMA engine driver so it does not require a bounce buffer. The only need for this was to align the buffer address. Implement unaligned access and we don't need to copy data twice.o Remove contigmalloc-based bounce buffer from xDMA code since it is not suitable for arbitrary memory provided by platform, which is sometimes a dedicated piece of memory that is not managed by OS at all.Sponsored by: DARPA, AFRL
Eliminate kmem_alloc_contig()'s unused arena parameter.Reviewed by: hselasky, kib, markjDiscussed with: jeffDifferential Revision: https://reviews.freebsd.org/D16799
Add driver for ARM PrimeCell PL330 DMA engine.Sponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D10201
Don't include sys/bus_dma.h directly, use machine/bus.h instead.Sponsored by: DARPA, AFRL
Tune xDMA interface slightly:o Move descriptors allocation to DMA engine drivero Add generic xdma_request() routineo Add less-generic scatter-gather application based on xdma interfaceTypical op
Tune xDMA interface slightly:o Move descriptors allocation to DMA engine drivero Add generic xdma_request() routineo Add less-generic scatter-gather application based on xdma interfaceTypical operation flow in peripheral device driver is:1. Get xDMA controllersc->xdma_tx = xdma_ofw_get(sc->dev, "tx");2. Allocate virtual channelsc->xchan_tx = xdma_channel_alloc(sc->xdma_tx, caps);3. Setup transfer status callbackxdma_setup_intr(sc->xchan_tx, my_tx_intr, sc, &sc->ih_tx);4. Request a transfer(s)ret = xdma_request(sc->xchan_tx, &req);5. Free the channelxdma_channel_free(sc->xdma_tx);6. Free the controllerxdma_put(sc->xdma_tx);Sponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D14971
Clean up MD pollution of bus_dma.h:--Remove special-case handling of sparc64 bus_dmamap* functions. Replace with a more generic mechanism that allows MD busdma implementations to generate inlin
Clean up MD pollution of bus_dma.h:--Remove special-case handling of sparc64 bus_dmamap* functions. Replace with a more generic mechanism that allows MD busdma implementations to generate inline mapping functions by defining WANT_INLINE_DMAMAP in <machine/bus_dma.h>. This is currently useful for sparc64, x86, and arm64, which all implement non-load dmamap operations as simple wrappers around map objects which may be bus- or device-specific.--Remove NULL-checked bus_dmamap macros. Implement the equivalent NULL checks in the inlined x86 implementation. For non-x86 platforms, these checks are a minor pessimization as those platforms do not currently allow NULL maps. NULL maps were originally allowed on arm64, which appears to have been the motivation behind adding arm[64]-specific barriers to bus_dma.h, but that support was removed in r299463.--Simplify the internal interface used by the bus_dmamap_load* variants and move it to bus_dma_internal.h--Fix some drivers that directly include sys/bus_dma.h despite the recommendations of bus_dma(9)Reviewed by: kib (previous revision), mariusDifferential Revision: https://reviews.freebsd.org/D10729
Add parenthesis.Noticed by: hpsSponsored by: DARPA, AFRL
o Fix unlocking.o Fix types for ds_addr/ds_len.Sponsored by: DARPA, AFRL
Add xDMA -- the DMA abstraction layer, initial verison.xDMA is a DMA framework designed to abstract the interactionbetween device drivers and DMA engines.Project wiki: https://wiki.freebsd.org/x
Add xDMA -- the DMA abstraction layer, initial verison.xDMA is a DMA framework designed to abstract the interactionbetween device drivers and DMA engines.Project wiki: https://wiki.freebsd.org/xdmaSponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D8807