14
* The collection of slow memcpy functions to move the data between BAR and system memory.
15
* If necessary the endianess conversion is performed to ensure that the data is encoded
16
* using the specified endianess in the BAR memory and using the native host order in the
17
* system memory. Since endianess conversion is symmetric, it is irrelevant if we are
18
* copying from system memory to BAR memory or vice-versa.
20
* The hardware may restrict access width or expose different behavior depending on the
21
* access width. These functions access memory using the specified word width only.
22
* 8-, 16-, 32-, and 64-bit wide access is supported.
24
* @param[out] dst - the destination memory region
25
* @param[in] src - the source memory region
26
* @param[in] access - the size of word (a single memory access) in bytes
27
* @param[in] n - the number of words to copy (\p n * \p access bytes are copied).
28
* @param[in] endianess - the endianess of the data words in the BAR memory
29
* @return - `dst` or NULL on error
31
void *pcilib_datacpy(void * dst, void const * src, uint8_t access, size_t n, pcilib_endianess_t endianess);
34
* The collection of slow memcpy functions to move the data between BAR and system memory.
35
* If necessary the endianess conversion is performed to ensure that the data is encoded
36
* using the specified endianess in the BAR memory and using the native host order in the
37
* system memory. Since endianess conversion is symmetric, it is irrelevant if we are
38
* copying from system memory to BAR memory or vice-versa.
40
* The hardware may restrict access width or expose different behavior depending on the
41
* access width. This function only perform 32-bit memory accesses.
43
* @param[out] dst - the destination memory region
44
* @param[in] src - the source memory region
45
* @param[in] n - the number of 32-bit words to copy (4 * \p n bytes are copied)
46
* @param[in] endianess - the endianess of the data words in the BAR memory
47
* @return - `dst` or NULL on error
13
49
void *pcilib_datacpy32(void * dst, void const * src, size_t n, pcilib_endianess_t endianess);
52
* The collection of slow memcpy functions to move the data between BAR and system memory.
53
* If necessary the endianess conversion is performed to ensure that the data is encoded
54
* using the specified endianess in the BAR memory and using the native host order in the
55
* system memory. Since endianess conversion is symmetric, it is irrelevant if we are
56
* copying from system memory to BAR memory or vice-versa.
58
* The hardware may restrict access width or expose different behavior depending on the
59
* access width. This function only perform 64-bit memory accesses.
61
* @param[out] dst - the destination memory region
62
* @param[in] src - the source memory region
63
* @param[in] n - the number of 64-bit words to copy (8 * \p n bytes are copied)
64
* @param[in] endianess - the endianess of the data words in the BAR memory
65
* @return - `dst` or NULL on error
14
67
void *pcilib_datacpy64(void * dst, void const * src, size_t n, pcilib_endianess_t endianess);
15
void *pcilib_datacpy(void * dst, void const * src, uint8_t size, size_t n, pcilib_endianess_t endianess);