1300478Ssephe/*- 2300478Ssephe * Copyright (c) 2016 Microsoft Corp. 3300478Ssephe * All rights reserved. 4300478Ssephe * 5300478Ssephe * Redistribution and use in source and binary forms, with or without 6300478Ssephe * modification, are permitted provided that the following conditions 7300478Ssephe * are met: 8300478Ssephe * 1. Redistributions of source code must retain the above copyright 9300478Ssephe * notice unmodified, this list of conditions, and the following 10300478Ssephe * disclaimer. 11300478Ssephe * 2. Redistributions in binary form must reproduce the above copyright 12300478Ssephe * notice, this list of conditions and the following disclaimer in the 13300478Ssephe * documentation and/or other materials provided with the distribution. 14300478Ssephe * 15300478Ssephe * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16300478Ssephe * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17300478Ssephe * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18300478Ssephe * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19300478Ssephe * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20300478Ssephe * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21300478Ssephe * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22300478Ssephe * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23300478Ssephe * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24300478Ssephe * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25300478Ssephe * 26300478Ssephe * $FreeBSD: releng/11.0/sys/dev/hyperv/include/hyperv_busdma.h 300478 2016-05-23 06:35:11Z sephe $ 27300478Ssephe */ 28300478Ssephe 29300478Ssephe#ifndef _HYPERV_BUSDMA_H_ 30300478Ssephe#define _HYPERV_BUSDMA_H_ 31300478Ssephe 32300478Ssephestruct hyperv_dma { 33300478Ssephe bus_addr_t hv_paddr; 34300478Ssephe bus_dma_tag_t hv_dtag; 35300478Ssephe bus_dmamap_t hv_dmap; 36300478Ssephe}; 37300478Ssephe 38300478Ssephevoid hyperv_dma_map_paddr(void *arg, bus_dma_segment_t *segs, int nseg, 39300478Ssephe int error); 40300478Ssephevoid *hyperv_dmamem_alloc(bus_dma_tag_t parent_dtag, bus_size_t alignment, 41300478Ssephe bus_addr_t boundary, bus_size_t size, struct hyperv_dma *dma, 42300478Ssephe int flags); 43300478Ssephevoid hyperv_dmamem_free(struct hyperv_dma *dma, void *ptr); 44300478Ssephe 45300478Ssephe#endif /* !_HYPERV_BUSDMA_H_ */ 46