NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release
NvRmMemHandleAttrRec Struct Reference

Detailed Description

Covers: [Libnvrm_mem_SWUD_106].

Attributes struct for NvRmMemHandle memory buffer allocation. Allows easy extention of memory attributes with no impact on existing users.

Valid Range: Members values within valid range

Definition at line 662 of file nvrm_memmgr_safe.h.

Collaboration diagram for NvRmMemHandleAttrRec:

Data Fields

const NvRmHeap * Heaps
 An array of heap enumerants that indicate which heaps the memory buffer is allowed to live in. More...
 
NvU32 NumHeaps
 The size of the Heaps[] array. More...
 
NvU32 Alignment
 Alignment Specifies the requested alignment of the buffer, measured in bytes. More...
 
NvOsMemAttribute Coherency
 Coherency Specifies the cache coherency mode desired if the memory is ever mapped. More...
 
NvU64 Size
 Size Specifies the requested size of the memory buffer in bytes. More...
 
NvRmMemTags Tags
 Tags Specifies application-specific tags which could be used during debugging to identify allocations. More...
 
NvBool ReclaimCache
 ReclaimCache If set, during memory alloc failure, try to release memory used by caches, if any(like X11 server resources), and reattempts memory allocation. More...
 
NvU32 Reserved1
 Reserved to maintain backward compatibility with any of prebuilt client binaries and not to change the offset of the other fields in the struct Range: [0, 2^32 - 1]. More...
 
NvU32 CompTags
 This field is deprecated and compression tags are no longer held at memmgr. More...
 
NvBool Contiguous
 If true, contiguous physical memory allocation is required. More...
 
NvBool CacheSync
 If true, pages accessed by user space will be tracked. More...
 
NvU32 * HeapNumber
 Specfies the heap number to allocate from. More...
 
NvBool CacheSyncAtReserve
 If true, pages accessed by user space will be tracked, all cache operations from user space become no op, reserve operation does cache WB implicitly and cache WB_INV is performed when page fault occurs Range: true, false. More...
 
NvBool HosSharedMemory
 Optional HOS-specific flag indicating memory should be setup for sharing CPU access between client and service process. More...
 
struct NvOsAllocatorRec * Allocator
 Instruct NvRm to allocate the memory using a specific allocator, instead of allocating directly from the kernel driver. More...
 
NvU64 vaddr
 Set vaddr to non-zero value to trigger creation of Handle from user process virtual address passed. More...
 
NvRmMemDesc * PhysMemDesc
 An Array of NvRmMemDesc struct holding physical memory chunks to create handle from. More...
 
NvU32 NumMemDesc
 Size of PhysMemDesc array Range: 0 to UINT32_MAX. More...
 
NvRmMemGpuAccess GpuAccess
 Holds GPU access necessary for Memory allocation Range: valid values of enum NvRmMemGpuAccess. More...
 
NvU32 AccessFlags
 RO/RW access flag on the buffer Range: [0, 2^32 - 1]. More...
 
NvS32 NumaNodeId
 Holds NUMA node id to allocate the buffer from. More...
 

Field Documentation

◆ AccessFlags

NvU32 NvRmMemHandleAttrRec::AccessFlags

RO/RW access flag on the buffer Range: [0, 2^32 - 1].

Definition at line 796 of file nvrm_memmgr_safe.h.

◆ Alignment

NvU32 NvRmMemHandleAttrRec::Alignment

Alignment Specifies the requested alignment of the buffer, measured in bytes.

Range: [0, 2^32 - 1], Must be a power of two.

Definition at line 684 of file nvrm_memmgr_safe.h.

◆ Allocator

struct NvOsAllocatorRec* NvRmMemHandleAttrRec::Allocator

Instruct NvRm to allocate the memory using a specific allocator, instead of allocating directly from the kernel driver.

Currently this is only supported on HOS, and must be NULL on other platforms. Range: valid pointer of type NvOsAllocatorRec*

Definition at line 763 of file nvrm_memmgr_safe.h.

◆ CacheSync

NvBool NvRmMemHandleAttrRec::CacheSync

If true, pages accessed by user space will be tracked.

Range: true, false

Definition at line 733 of file nvrm_memmgr_safe.h.

◆ CacheSyncAtReserve

NvBool NvRmMemHandleAttrRec::CacheSyncAtReserve

If true, pages accessed by user space will be tracked, all cache operations from user space become no op, reserve operation does cache WB implicitly and cache WB_INV is performed when page fault occurs Range: true, false.

Definition at line 748 of file nvrm_memmgr_safe.h.

◆ Coherency

NvOsMemAttribute NvRmMemHandleAttrRec::Coherency

Coherency Specifies the cache coherency mode desired if the memory is ever mapped.

Range: NvOsMemAttribute_Uncached to NvOsMemAttribute_End

Definition at line 690 of file nvrm_memmgr_safe.h.

◆ CompTags

NvU32 NvRmMemHandleAttrRec::CompTags

This field is deprecated and compression tags are no longer held at memmgr.

Clients need to pass compression tags info directly to the driver that need it. Exist for Backward compatibility. Range: [0, 2^32 - 1]

Definition at line 721 of file nvrm_memmgr_safe.h.

◆ Contiguous

NvBool NvRmMemHandleAttrRec::Contiguous

If true, contiguous physical memory allocation is required.

However, that will set platform-specific restrictions on how big memory areas can be allocated. Range: true, false

Definition at line 728 of file nvrm_memmgr_safe.h.

◆ GpuAccess

NvRmMemGpuAccess NvRmMemHandleAttrRec::GpuAccess

Holds GPU access necessary for Memory allocation Range: valid values of enum NvRmMemGpuAccess.

Definition at line 791 of file nvrm_memmgr_safe.h.

◆ HeapNumber

NvU32* NvRmMemHandleAttrRec::HeapNumber

Specfies the heap number to allocate from.

This should be an array of size "NumHeaps". This option is ignored for all heap types except "NvRmHeap_IVC". See NvRmMemQueryHeaps() on how to find the heap number. Range: valid pointer of type NvU32*

Definition at line 740 of file nvrm_memmgr_safe.h.

◆ Heaps

const NvRmHeap* NvRmMemHandleAttrRec::Heaps

An array of heap enumerants that indicate which heaps the memory buffer is allowed to live in.

When a memory buffer is requested to be allocated or needs to be moved, Heaps[0] will be the first choice to allocate from or move to, Heaps[1] will be the second choice, and so on until the end of the array. Range: valid pointer of type <const NvRmHeap*>

Definition at line 671 of file nvrm_memmgr_safe.h.

◆ HosSharedMemory

NvBool NvRmMemHandleAttrRec::HosSharedMemory

Optional HOS-specific flag indicating memory should be setup for sharing CPU access between client and service process.

Note that memory setup in this way cannot be mapped to devices. Range: true, false

Definition at line 755 of file nvrm_memmgr_safe.h.

◆ NumaNodeId

NvS32 NvRmMemHandleAttrRec::NumaNodeId

Holds NUMA node id to allocate the buffer from.

Valid Range: [-(2^31), (2^31) - 1]

Definition at line 801 of file nvrm_memmgr_safe.h.

◆ NumHeaps

NvU32 NvRmMemHandleAttrRec::NumHeaps

The size of the Heaps[] array.

If NumHeaps is zero, then Heaps must also be NULL, and the RM will select a default list of heaps on the client's behalf. Range: [0, 2^32 - 1]

Definition at line 678 of file nvrm_memmgr_safe.h.

◆ NumMemDesc

NvU32 NvRmMemHandleAttrRec::NumMemDesc

Size of PhysMemDesc array Range: 0 to UINT32_MAX.

Definition at line 786 of file nvrm_memmgr_safe.h.

◆ PhysMemDesc

NvRmMemDesc* NvRmMemHandleAttrRec::PhysMemDesc

An Array of NvRmMemDesc struct holding physical memory chunks to create handle from.

Set PhysMemDesc to non-zero value to trigger creation of Handle from physical memory chunks passed.

The client must be privileged to create a handle from physical memory chunks passed and physical memory should be in the allowed range that is specified to memory manager. Range: valid pointer

Definition at line 781 of file nvrm_memmgr_safe.h.

◆ ReclaimCache

NvBool NvRmMemHandleAttrRec::ReclaimCache

ReclaimCache If set, during memory alloc failure, try to release memory used by caches, if any(like X11 server resources), and reattempts memory allocation.

Range: true, false

Definition at line 708 of file nvrm_memmgr_safe.h.

◆ Reserved1

NvU32 NvRmMemHandleAttrRec::Reserved1

Reserved to maintain backward compatibility with any of prebuilt client binaries and not to change the offset of the other fields in the struct Range: [0, 2^32 - 1].

Definition at line 714 of file nvrm_memmgr_safe.h.

◆ Size

NvU64 NvRmMemHandleAttrRec::Size

Size Specifies the requested size of the memory buffer in bytes.

Range: [0, 2^64 - 1]

Definition at line 695 of file nvrm_memmgr_safe.h.

◆ Tags

NvRmMemTags NvRmMemHandleAttrRec::Tags

Tags Specifies application-specific tags which could be used during debugging to identify allocations.

Range: valid values of NvRmMemTags

Definition at line 701 of file nvrm_memmgr_safe.h.

◆ vaddr

NvU64 NvRmMemHandleAttrRec::vaddr

Set vaddr to non-zero value to trigger creation of Handle from user process virtual address passed.

Range: [0, 2^64 - 1]

Definition at line 769 of file nvrm_memmgr_safe.h.


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