XenevaOS
Loading...
Searching...
No Matches
Public Attributes | List of all members
hl_mem_in Struct Reference

#include <habanalabs_accel.h>

Public Attributes

union { 
 
   struct { 
 
      __u64   mem_size 
 
      __u64   page_size 
 
   }   alloc 
 
   struct { 
 
      __u64   handle 
 
   }   free 
 
   struct { 
 
      __u64   hint_addr 
 
      __u64   handle 
 
   }   map_device 
 
   struct { 
 
      __u64   host_virt_addr 
 
      __u64   hint_addr 
 
      __u64   mem_size 
 
   }   map_host 
 
   struct { 
 
      __u64   block_addr 
 
   }   map_block 
 
   struct { 
 
      __u64   device_virt_addr 
 
   }   unmap 
 
   struct { 
 
      __u64   addr 
 
      __u64   mem_size 
 
      __u64   offset 
 
   }   export_dmabuf_fd 
 
};  
 
__u32 op
 
__u32 flags
 
__u32 ctx_id
 
__u32 num_of_elements
 

Member Data Documentation

◆ [union]

union { ... } hl_mem_in

◆ addr

__u64 hl_mem_in::addr

◆ [struct]

struct { ... } hl_mem_in::alloc

structure for device memory allocation (used with the HL_MEM_OP_ALLOC op) @mem_size: memory size to allocate @page_size: page size to use on allocation. when the value is 0 the default page size will be taken.

◆ block_addr

__u64 hl_mem_in::block_addr

◆ ctx_id

__u32 hl_mem_in::ctx_id

◆ device_virt_addr

__u64 hl_mem_in::device_virt_addr

◆ [struct]

struct { ... } hl_mem_in::export_dmabuf_fd

structure for exporting DMABUF object (used with the HL_MEM_OP_EXPORT_DMABUF_FD op) @addr: for Gaudi1, the driver expects a physical address inside the device's DRAM. this is because in Gaudi1 we don't have MMU that covers the device's DRAM. for all other ASICs, the driver expects a device virtual address that represents the start address of a mapped DRAM memory area inside the device. the address must be the same as was received from the driver during a previous HL_MEM_OP_MAP operation. @mem_size: size of memory to export. @offset: for Gaudi1, this value must be 0. For all other ASICs, the driver expects an offset inside of the memory area describe by addr. the offset represents the start address of that the exported dma-buf object describes.

◆ flags

__u32 hl_mem_in::flags

◆ [struct]

struct { ... } hl_mem_in::free

structure for free-ing device memory (used with the HL_MEM_OP_FREE op) @handle: handle returned from HL_MEM_OP_ALLOC

◆ handle

__u64 hl_mem_in::handle

◆ hint_addr

__u64 hl_mem_in::hint_addr

◆ host_virt_addr

__u64 hl_mem_in::host_virt_addr

◆ [struct]

struct { ... } hl_mem_in::map_block

structure for mapping hw block (used with the HL_MEM_OP_MAP_BLOCK op) @block_addr:HW block address to map, a handle and size will be returned to the user and will be used to mmap the relevant block. only addresses from configuration space are allowed.

◆ [struct]

struct { ... } hl_mem_in::map_device

structure for mapping device memory (used with the HL_MEM_OP_MAP op) @hint_addr: requested virtual address of mapped memory. the driver will try to map the requested region to this hint address, as long as the address is valid and not already mapped. the user should check the returned address of the IOCTL to make sure he got the hint address. passing 0 here means that the driver will choose the address itself. @handle: handle returned from HL_MEM_OP_ALLOC.

◆ [struct]

struct { ... } hl_mem_in::map_host

structure for mapping host memory (used with the HL_MEM_OP_MAP op) @host_virt_addr: address of allocated host memory. @hint_addr: requested virtual address of mapped memory. the driver will try to map the requested region to this hint address, as long as the address is valid and not already mapped. the user should check the returned address of the IOCTL to make sure he got the hint address. passing 0 here means that the driver will choose the address itself. @size: size of allocated host memory.

◆ mem_size

__u64 hl_mem_in::mem_size

◆ num_of_elements

__u32 hl_mem_in::num_of_elements

◆ offset

__u64 hl_mem_in::offset

◆ op

__u32 hl_mem_in::op

◆ page_size

__u64 hl_mem_in::page_size

◆ [struct]

struct { ... } hl_mem_in::unmap

structure for unmapping host memory (used with the HL_MEM_OP_UNMAP op) @device_virt_addr: virtual address returned from HL_MEM_OP_MAP


The documentation for this struct was generated from the following file: