NV services: Difference between revisions
No edit summary |
|||
Line 1,002: | Line 1,002: | ||
| 0x40284109 || In || 40 || [[#NVGPU_AS_IOCTL_ALLOC_AS_EX]] | | 0x40284109 || In || 40 || [[#NVGPU_AS_IOCTL_ALLOC_AS_EX]] | ||
|- | |- | ||
| 0xC038410A || Inout || 56 || [[# | | 0xC038410A || Inout || 56 || [[#NVGPU_AS_IOCTL_MAP_BUFFER_EX2]] | ||
|- | |- | ||
| 0xC0??4114 || Inout || Variable || [[#NVGPU_AS_IOCTL_REMAP]] | | 0xC0??4114 || Inout || Variable || [[#NVGPU_AS_IOCTL_REMAP]] | ||
Line 1,038: | Line 1,038: | ||
=== NVGPU_AS_IOCTL_MAP_BUFFER === | === NVGPU_AS_IOCTL_MAP_BUFFER === | ||
Maps a memory region in the device address space. | Maps a memory region in the device address space. | ||
Unaligned size will cause a [[#Panic]]. | |||
On success, the mapped memory region is granted the [[SVC#MemoryAttribute|DeviceShared]] attribute. | On success, the mapped memory region is granted the [[SVC#MemoryAttribute|DeviceShared]] attribute. | ||
Line 1,063: | Line 1,065: | ||
__in u32 flags; // bit0: fixed_offset, bit2: cacheable | __in u32 flags; // bit0: fixed_offset, bit2: cacheable | ||
__inout u32 kind; // -1 is default | __inout u32 kind; // -1 is default | ||
__in u32 | __in u32 mem_id; // nvmap handle | ||
u32 reserved; | |||
__in u64 buffer_offset; | __in u64 buffer_offset; | ||
__in u64 mapping_size; | __in u64 mapping_size; | ||
union { | union { | ||
__out u64 offset; | |||
__in u64 align; | |||
}; | |||
}; | }; | ||
Line 1,119: | Line 1,121: | ||
}; | }; | ||
=== | === NVGPU_AS_IOCTL_MAP_BUFFER_EX2 === | ||
Maps a memory region in the device address space with extra params. | |||
Unaligned size will cause a [[#Panic]]. | |||
On success, the mapped memory region is granted the [[SVC#MemoryAttribute|DeviceShared]] attribute. | |||
struct { | |||
__in u32 flags; // bit0: fixed_offset, bit2: cacheable | __in u32 flags; // bit0: fixed_offset, bit2: cacheable | ||
__inout u32 kind; // -1 is default | |||
__in u32 | __in u32 mem_id; // nvmap handle | ||
u32 reserved0; | |||
__in u64 buffer_offset; | __in u64 buffer_offset; | ||
__in u64 mapping_size; | __in u64 mapping_size; | ||
union { | |||
__in u64 | __out u64 offset; | ||
__in u32 | __in u64 align; | ||
u32 | }; | ||
__in u64 vma_addr; | |||
__in u32 pages; | |||
u32 reserved1; | |||
}; | }; | ||
Line 1,139: | Line 1,148: | ||
struct remap_op { | struct remap_op { | ||
__in u16 flags; | __in u16 flags; // bit2: cacheable | ||
__in u16 kind; | __in u16 kind; | ||
__in u32 mem_handle; | __in u32 mem_handle; | ||
__in u32 | __in u32 mem_offset_in_pages; | ||
__in u32 | __in u32 virt_offset_in_pages; // (alloc_space_offset >> 0x10) | ||
__in u32 num_pages; | __in u32 num_pages; // alloc_space_pages | ||
}; | }; | ||