iPXE
mlx_memory_priv.h
Go to the documentation of this file.
00001 #ifndef MLXUTILS_INCLUDE_PRIVATE_MEMORYPRIV_H_
00002 #define MLXUTILS_INCLUDE_PRIVATE_MEMORYPRIV_H_
00003 
00004 /*
00005  * Copyright (C) 2015 Mellanox Technologies Ltd.
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License as
00009  * published by the Free Software Foundation; either version 2 of the
00010  * License, or any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00020  * 02110-1301, USA.
00021  */
00022 
00023 FILE_LICENCE ( GPL2_OR_LATER );
00024 
00025 #include "../../../mlx_utils/include/public/mlx_utils.h"
00026 
00027 mlx_status
00028 mlx_memory_alloc_priv(
00029                                 IN mlx_utils *utils,
00030                                 IN mlx_size size,
00031                                 OUT mlx_void **ptr
00032                                 );
00033 
00034 mlx_status
00035 mlx_memory_zalloc_priv(
00036                                 IN mlx_utils *utils,
00037                                 IN mlx_size size,
00038                                 OUT mlx_void **ptr
00039                                 );
00040 
00041 mlx_status
00042 mlx_memory_free_priv(
00043                                 IN mlx_utils *utils,
00044                                 IN mlx_void *ptr
00045                                 );
00046 mlx_status
00047 mlx_memory_alloc_dma_priv(
00048                                         IN mlx_utils *utils,
00049                                         IN mlx_size size ,
00050                                         IN mlx_size align,
00051                                         OUT mlx_void **ptr
00052                                         );
00053 
00054 mlx_status
00055 mlx_memory_free_dma_priv(
00056                                         IN mlx_utils *utils,
00057                                         IN mlx_size size ,
00058                                         IN mlx_void *ptr
00059                                         );
00060 mlx_status
00061 mlx_memory_map_dma_priv(
00062                                         IN mlx_utils *utils,
00063                                         IN mlx_void *addr ,
00064                                         IN mlx_size number_of_bytes,
00065                                         OUT mlx_physical_address *phys_addr,
00066                                         OUT mlx_void **mapping
00067                                         );
00068 
00069 mlx_status
00070 mlx_memory_ummap_dma_priv(
00071                                         IN mlx_utils *utils,
00072                                         IN mlx_void *mapping
00073                                         );
00074 
00075 mlx_status
00076 mlx_memory_cmp_priv(
00077                                         IN mlx_utils *utils,
00078                                         IN mlx_void *first_block,
00079                                         IN mlx_void *second_block,
00080                                         IN mlx_size size,
00081                                         OUT mlx_uint32 *out
00082                                         );
00083 
00084 mlx_status
00085 mlx_memory_set_priv(
00086                                         IN mlx_utils *utils,
00087                                         IN mlx_void *block,
00088                                         IN mlx_int32 value,
00089                                         IN mlx_size size
00090                                         );
00091 
00092 mlx_status
00093 mlx_memory_cpy_priv(
00094                                         IN mlx_utils *utils,
00095                                         OUT mlx_void *destination_buffer,
00096                                         IN mlx_void *source_buffer,
00097                                         IN mlx_size length
00098                                         );
00099 
00100 mlx_status
00101 mlx_memory_cpu_to_be32_priv(
00102                         IN mlx_utils *utils,
00103                         IN mlx_uint32 source,
00104                         IN mlx_uint32 *destination
00105                         );
00106 
00107 mlx_status
00108 mlx_memory_be32_to_cpu_priv(
00109                         IN mlx_utils *utils,
00110                         IN mlx_uint32 source,
00111                         IN mlx_uint32 *destination
00112                         );
00113 #endif /* STUB_MLXUTILS_INCLUDE_PRIVATE_MEMORYPRIV_H_ */