You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mlx_memory_priv.h 2.5KB

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