1/* 2 * Copyright (c) 2012, ETH Zurich. 3 * All rights reserved. 4 * 5 * This file is distributed under the terms in the attached LICENSE file. 6 * If you do not find this file, copies can be found by writing to: 7 * ETH Zurich D-INFK, Universitaetsstrasse 6, CH-8092 Zurich. Attn: Systems Group. 8 */ 9 10interface dma "Generic DMA service interface" { 11 12 typedef uint64 id; 13 14 /** 15 * \brief registers a memory region to be used for DMA transfers 16 * 17 * \param IN memory the memory region to register 18 * \param OUT msgerr the result of the operation 19 * 20 * Note: either local or remote memory must be registered 21 */ 22 rpc register_(in cap memory, out errval msgerr); 23 24 25 /** 26 * \brief deregisters a memory region to be used for DMA transfers 27 * 28 * \param IN memory the memory region to register 29 * \param OUT msgerr the result of the operation 30 * 31 * Note: either local or remote memory must be registered 32 */ 33 rpc deregister(in cap memory, out errval msgerr); 34 35 /** 36 * \brief issues a new DMA transfer request to the Xeon Phi DMA controller 37 * 38 * \param IN src source address for the transfer 39 * \param IN dsc destination address of the transfer 40 * \param IN length size of the transfer in bytes 41 * \param OUT err result of the transfer request 42 * \param OUT id returns the id of the transfer 43 */ 44 rpc memcpy(in uint64 src, in uint64 dst, in uint64 length, 45 out errval err, out id id); 46 47 /** 48 * \brief DMA transfer done notification 49 * 50 * \param id the id of the completed transfer 51 * \param err the result of the transfer 52 */ 53 message done(id id, errval err); 54 55};