NV services: Difference between revisions

Thog (talk | contribs)
mNo edit summary
No edit summary
Line 858: Line 858:
Maps a memory region in the device address space. Identical to Linux driver pretty much.
Maps a memory region in the device address space. Identical to Linux driver pretty much.


On success, the mapped memory region is locked by having [[SVC#MemoryState]] bit34 set.
On success, the mapped memory region is granted the [[SVC#MemoryAttribute|DeviceShared]] attribute.


   struct {
   struct {
Line 876: Line 876:
Unaligned size will cause a [[#Panic]].
Unaligned size will cause a [[#Panic]].


On success, the mapped memory region is locked by having [[SVC#MemoryState]] bit34 set.
On success, the mapped memory region is granted the [[SVC#MemoryAttribute|DeviceShared]] attribute.


   struct {
   struct {
Line 955: Line 955:


   struct remap_entry {
   struct remap_entry {
     __in u16 flags;       // 0 or 4
     __in u16 flags;           // 0 or 4
     __in u16 kind;           
     __in u16 kind;           
     __in u32 nvmap_handle;
     __in u32 nvmap_handle;
     __in u32 map_offset;
     __in u32 map_offset;
     __in u32 gpu_offset;      // (alloc_space_offset >> 0x10)
     __in u32 gpu_offset;      // (alloc_space_offset >> 0x10)
     __in u32 pages;       // alloc_space_pages
     __in u32 pages;           // alloc_space_pages
   };
   };