[golan] Add Connect-IB, ConnectX-4 and ConnectX-4 Lx (Infiniband) support
[ipxe.git] / src / drivers / infiniband / mlx_utils / include / private / mlx_memory_priv.h
1 #ifndef MLXUTILS_INCLUDE_PRIVATE_MEMORYPRIV_H_
2 #define MLXUTILS_INCLUDE_PRIVATE_MEMORYPRIV_H_
3
4 /*
5 * Copyright (C) 2015 Mellanox Technologies Ltd.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of the
10 * License, or any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 * 02110-1301, USA.
21 */
22
23 FILE_LICENCE ( GPL2_OR_LATER );
24
25 #include "../../../mlx_utils/include/public/mlx_utils.h"
26
27 mlx_status
28 mlx_memory_alloc_priv(
29 IN mlx_utils *utils,
30 IN mlx_size size,
31 OUT mlx_void **ptr
32 );
33
34 mlx_status
35 mlx_memory_zalloc_priv(
36 IN mlx_utils *utils,
37 IN mlx_size size,
38 OUT mlx_void **ptr
39 );
40
41 mlx_status
42 mlx_memory_free_priv(
43 IN mlx_utils *utils,
44 IN mlx_void *ptr
45 );
46 mlx_status
47 mlx_memory_alloc_dma_priv(
48 IN mlx_utils *utils,
49 IN mlx_size size ,
50 IN mlx_size align,
51 OUT mlx_void **ptr
52 );
53
54 mlx_status
55 mlx_memory_free_dma_priv(
56 IN mlx_utils *utils,
57 IN mlx_size size ,
58 IN mlx_void *ptr
59 );
60 mlx_status
61 mlx_memory_map_dma_priv(
62 IN mlx_utils *utils,
63 IN mlx_void *addr ,
64 IN mlx_size number_of_bytes,
65 OUT mlx_physical_address *phys_addr,
66 OUT mlx_void **mapping
67 );
68
69 mlx_status
70 mlx_memory_ummap_dma_priv(
71 IN mlx_utils *utils,
72 IN mlx_void *mapping
73 );
74
75 mlx_status
76 mlx_memory_cmp_priv(
77 IN mlx_utils *utils,
78 IN mlx_void *first_block,
79 IN mlx_void *second_block,
80 IN mlx_size size,
81 OUT mlx_uint32 *out
82 );
83
84 mlx_status
85 mlx_memory_set_priv(
86 IN mlx_utils *utils,
87 IN mlx_void *block,
88 IN mlx_int32 value,
89 IN mlx_size size
90 );
91
92 mlx_status
93 mlx_memory_cpy_priv(
94 IN mlx_utils *utils,
95 OUT mlx_void *destination_buffer,
96 IN mlx_void *source_buffer,
97 IN mlx_size length
98 );
99
100 mlx_status
101 mlx_memory_cpu_to_be32_priv(
102 IN mlx_utils *utils,
103 IN mlx_uint32 source,
104 IN mlx_uint32 *destination
105 );
106
107 mlx_status
108 mlx_memory_be32_to_cpu_priv(
109 IN mlx_utils *utils,
110 IN mlx_uint32 source,
111 IN mlx_uint32 *destination
112 );
113 #endif /* STUB_MLXUTILS_INCLUDE_PRIVATE_MEMORYPRIV_H_ */