Changes

Jump to navigation Jump to search
753 bytes added ,  18:44, 24 May 2021
no edit summary
Line 1: Line 1: −
The Switch uses a customized NVIDIA driver.
  −
   
= nvdrv, nvdrv:a, nvdrv:s, nvdrv:t =
 
= nvdrv, nvdrv:a, nvdrv:s, nvdrv:t =
 
This is "nns::nvdrv::INvDrvServices".
 
This is "nns::nvdrv::INvDrvServices".
  −
Main NVIDIA driver service.
      
Each service is used by:
 
Each service is used by:
 
* "nvdrv": Applications.
 
* "nvdrv": Applications.
** [[#Permissions|Permission]] mask is [3.0.0+] 0xA82B ([1.0.0-2.3.0] 0x2B).
+
** [[#NvDrvPermission|Permission]] mask is [11.0.0+] 0xA83B ([1.0.0-2.3.0] 0x2B, [3.0.0+] 0xA82B).
 
* "nvdrv:a": Applets.
 
* "nvdrv:a": Applets.
** [[#Permissions|Permission]] mask is [3.0.0+] 0x10A9 ([1.0.0-2.3.0] 0xA9).
+
** [[#NvDrvPermission|Permission]] mask is [3.0.0+] 0x10A9 ([1.0.0-2.3.0] 0xA9).
 
* "nvdrv:s": Sysmodules.
 
* "nvdrv:s": Sysmodules.
** [[#Permissions|Permission]] mask is [3.0.0+] 0x439E ([1.0.0-2.3.0] 0x39E).
+
** [[#NvDrvPermission|Permission]] mask is [3.0.0+] 0x439E ([1.0.0-2.3.0] 0x39E).
 
* "nvdrv:t": Factory.
 
* "nvdrv:t": Factory.
** [[#Permissions|Permission]] mask is 0xFFFFFFFF.
+
** [[#NvDrvPermission|Permission]] mask is 0xFFFFFFFF.
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 50: Line 46:     
== Open ==
 
== Open ==
Takes a type-0x5 input buffer for the device-path. Returns the output 32bit '''fd''' and the u32 '''error_code'''.
+
Takes a type-0x5 input buffer '''Path'''. Returns two output u32s '''FdOut''' and '''Err'''.
    
== Ioctl ==
 
== Ioctl ==
Takes a 32bit '''fd''', an u32 '''ioctl_cmd''', a type-0x21 input buffer, and a type-0x22 output buffer. Returns an output u32 ('''error_code''').
+
Takes two input u32s '''Fd''' and '''Iocode''', a type-0x21 input buffer and a type-0x22 output buffer. Returns an output u32 '''Err'''.
    
The addr/size for send/recv buffers are only set when the associated direction bit is set in the ioctl cmd (addr/size = 0 otherwise).
 
The addr/size for send/recv buffers are only set when the associated direction bit is set in the ioctl cmd (addr/size = 0 otherwise).
    
== Close ==
 
== Close ==
Takes a 32bit '''fd'''. Returns an output u32 ('''error_code''').
+
Takes an input u32 '''Fd'''. Returns an output u32 '''Err'''.
    
== Initialize ==
 
== Initialize ==
Takes two copy-handles ('''current_process''' and '''transfer_memory''') and an input u32 ('''transfer_memory_size'''). Returns an output u32 ('''error_code''').
+
Takes an input Process handle, an input TransferMemory handle and an input u32 '''Size'''. Returns an output u32 '''Err'''.
   −
Webkit applet creates the transfer-memory with perm = 0 and size 0x300000.
+
Webkit applet creates the TransferMemory with perm == 0 and size == 0x300000.
    
== QueryEvent ==
 
== QueryEvent ==
Takes two input u32s ('''fd''' and '''event_id'''), with the second word immediately after the first one. Returns an output u32 ('''error_code''') and a copy-handle ('''event_handle''').
+
Takes two input u32s '''Fd''' and '''EvtId'''. Returns an output u32 '''Err''' and an output Event handle.
    
QueryEvent is only supported on (and implemented differently on):
 
QueryEvent is only supported on (and implemented differently on):
Line 83: Line 79:     
== MapSharedMem ==
 
== MapSharedMem ==
Takes a copy-handle ('''transfer_memory''') and two input u32s ('''fd''' and '''nvmap_handle'''). Returns an output u32 ('''error_code''').
+
Takes an input TransferMemory handle and two input u32s '''Fd''' and '''HMem'''. Returns an output u32 '''Err'''.
 +
 
 +
'''HMem''' is a [[#/dev/nvmap|/dev/nvmap]] memory handle.
    
== GetStatus ==
 
== GetStatus ==
Takes no input. Returns 0x10-bytes and an output u32 ('''error_code''').
+
Takes no input. Returns an output [[#NvDrvStatus]] and an output u32 '''Err'''.
    
== SetAruidWithoutCheck ==
 
== SetAruidWithoutCheck ==
Takes an input u64 which must [[IPC_Marshalling|match]] the user-process PID ([[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]]). Returns an output u32 ('''error_code''').
+
Takes an input u64 '''Aruid'''. Returns an output u32 '''Err'''.
 +
 
 +
'''Aruid''' must [[IPC_Marshalling|match]] the current [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]].
    
== SetAruid ==
 
== SetAruid ==
Takes a PID-descriptor and an u64 which must [[IPC_Marshalling|match]] the user-process PID ([[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]]). Returns an output u32 ('''error_code''').
+
Takes a PID-descriptor and an input [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]]. Returns an output u32 '''Err'''.
    
== DumpStatus ==
 
== DumpStatus ==
No input or output.
+
No input/output.
    
== InitializeDevtools ==
 
== InitializeDevtools ==
Takes a copy-handle ('''transfer_memory''') and an input u32 ('''transfer_memory_size'''). Returns an output u32 ('''error_code''').
+
Takes an input TransferMemory handle and an input u32 '''Size'''. Returns an output u32 '''Err'''.
    
== Ioctl2 ==
 
== Ioctl2 ==
Takes a type-0x21 buffer, a type-0x22 buffer, a type-0x21 buffer, and two input u32s. Returns an output u32 ('''error_code''').
+
Takes two input u32s '''Fd''' and '''Iocode''', two type-0x21 input buffers and a type-0x22 output buffer. Returns an output u32 '''Err'''.
    
== Ioctl3 ==
 
== Ioctl3 ==
Takes a type-0x21 buffer, a type-0x22 buffer, another type-0x22 buffer, and two input u32s. Returns an output u32 (error_code).
+
Takes two input u32s '''Fd''' and '''Iocode''', a type-0x21 input buffer and two type-0x22 output buffers. Returns an output u32 '''Err'''.
Cmdhdr_word1 is 0x100B instead of 0xC0B.
      
== SetGraphicsFirmwareMemoryMarginEnabled ==
 
== SetGraphicsFirmwareMemoryMarginEnabled ==
Line 112: Line 111:  
This sets a boolean value based on the input u64 and the value of the "nv!nv_graphics_firmware_memory_margin" system configuration, but only for "nvdrv" (the other services default to false).
 
This sets a boolean value based on the input u64 and the value of the "nv!nv_graphics_firmware_memory_margin" system configuration, but only for "nvdrv" (the other services default to false).
   −
Official user-processes starting with 3.0.0 now use this at the end of nvdrv service init with value 0x1.
+
[3.0.0+] Official user-processes now use this at the end of nvdrv service init with value 0x1.
 +
 
 +
= nvmemp =
 +
This is "nv::MemoryProfiler::IMemoryProfiler".
   −
= Permissions =
+
/dev/nvhost-ctrl sends the ioctl NVHOST_IOCTL_CTRL_GET_CONFIG to check the config "nv!NV_MEMORY_PROFILER". If config_str returns "1", the application attempts to use nvmemp.
Each nvdrv service is initialized with a bitfield that controls access to nodes and other operations.
      
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
!  Bits
  −
!  Name
  −
!  Description
   
|-
 
|-
| 0
+
! Cmd || Name
| NvDrvPermission_Gpu
  −
| Can access [[#Channels|/dev/nvhost-gpu]], [[#/dev/nvhost-ctrl-gpu|/dev/nvhost-ctrl-gpu]] and [[#/dev/nvhost-as-gpu|/dev/nvhost-as-gpu]].
   
|-
 
|-
| 1
+
| 0 || [[#Open_2|Open]]
| NvDrvPermission_GpuDebug
  −
| Can access [[#/dev/nvhost-dbg-gpu|/dev/nvhost-dbg-gpu]] and [[#/dev/nvhost-prof-gpu|/dev/nvhost-prof-gpu]].
   
|-
 
|-
| 2
+
| 1 || [[#GetPid|GetPid]]
| NvDrvPermission_GpuSchedule
+
|}
| Can access [[#/dev/nvsched-ctrl|/dev/nvsched-ctrl]].
+
 
 +
== Open ==
 +
Takes an input TransferMemory handle and an input u32 '''Size'''. No output.
 +
 
 +
== GetPid ==
 +
No input. Returns an output u32 '''Pid'''.
 +
 
 +
= nvdrvdbg =
 +
This is "nns::nvdrv::INvDrvDebugFSServices".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 3
+
! Cmd || Name
| NvDrvPermission_VIC
  −
| Can access [[#Channels|/dev/nvhost-vic]].
   
|-
 
|-
| 4
+
| 0 || [[#DebugFSOpen]]
| NvDrvPermission_VideoEncoder
+
|-
| Can access [[#Channels|/dev/nvhost-msenc]].
+
| 1 || [[#DebugFSClose]]
 
|-
 
|-
| 5
+
| 2 || [[#GetDebugFSKeys]]
| NvDrvPermission_VideoDecoder
  −
| Can access [[#Channels|/dev/nvhost-nvdec]].
   
|-
 
|-
| 6
+
| 3 || [[#GetDebugFSValue]]
| NvDrvPermission_TSEC
  −
| Can access [[#Channels|/dev/nvhost-tsec]].
   
|-
 
|-
| 7
+
| 4 || [[#SetDebugFSValue]]
| NvDrvPermission_JPEG
+
|}
| Can access [[#Channels|/dev/nvhost-nvjpg]].
+
 
 +
== DebugFSOpen ==
 +
Takes an input Process handle. Returns an output u32 '''Handle'''.
 +
 
 +
== DebugFSClose ==
 +
Takes an input u32 '''Handle'''. No output.
 +
 
 +
== GetDebugFSKeys ==
 +
Takes an input u32 '''Handle''' and a type-0x6 output buffer '''OutValueBuf'''. Returns an output u32 '''Err'''.
 +
 
 +
== GetDebugFSValue ==
 +
Takes an input u32 '''Handle''', a type-0x5 input buffer '''InKeyBuf''' and a type-0x6 output buffer '''OutValueBuf'''. Returns an output u32 '''Err'''.
 +
 
 +
== SetDebugFSValue ==
 +
Takes an input u32 '''Handle''' and two type-0x5 input buffers '''InKeyBuf''' and '''InValueBuf'''. Returns an output u32 '''Err'''.
 +
 
 +
= nvgem:c =
 +
This is "nv::gemcontrol::INvGemControl".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 8
+
! Cmd || Name
| NvDrvPermission_Display
  −
| Can access [[#Channels|/dev/nvhost-display]], [[#/dev/nvcec-ctrl|/dev/nvcec-ctrl]], [[#/dev/nvhdcp_up-ctrl|/dev/nvhdcp_up-ctrl]], [[#/dev/nvdisp-ctrl|/dev/nvdisp-ctrl]], [[#/dev/nvdisp-disp0, /dev/nvdisp-disp1|/dev/nvdisp-disp0]], [[#/dev/nvdisp-disp0, /dev/nvdisp-disp1|/dev/nvdisp-disp1]], [[#/dev/nvdcutil-disp0, /dev/nvdcutil-disp1|/dev/nvdcutil-disp0]] and [[#/dev/nvdcutil-disp0, /dev/nvdcutil-disp1|/dev/nvdcutil-disp1]].
   
|-
 
|-
| 9
+
| 0 || [[#Initialize_2|Initialize]]
| NvDrvPermission_ImportMemory
  −
| Can duplicate [[#/dev/nvmap|nvmap]] handles from other processes with [[#NVMAP_IOC_FROM_ID|NVMAP_IOC_FROM_ID]].
   
|-
 
|-
| 10
+
| 1 || [[#GetEventHandle|GetEventHandle]]
| NvDrvPermission_NoCheckedAruid
  −
| Can use [[#SetAruidWithoutCheck|SetAruidWithoutCheck]].
   
|-
 
|-
| 11
+
| 2 || [[#ControlNotification|ControlNotification]]
|
+
|-
| Can use [[#SetGraphicsFirmwareMemoryMarginEnabled|SetGraphicsFirmwareMemoryMarginEnabled]].
+
| 3 || [[#SetNotificationPerm|SetNotificationPerm]]
 
|-
 
|-
| 12
+
| 4 || [[#SetCoreDumpPerm|SetCoreDumpPerm]]
|
  −
| Can duplicate exported [[#/dev/nvmap|nvmap]] handles from other processes with [[#NVMAP_IOC_FROM_ID|NVMAP_IOC_FROM_ID]].
   
|-
 
|-
| 13
+
| 5 || [1.0.0-4.1.0] [[#GetAruid|GetAruid]]
|
  −
|  
   
|-
 
|-
| 14
+
| 6 || [[#Reset|Reset]]
|
  −
| Can use [[#NVMAP_IOC_EXPORT_FOR_ARUID|NVMAP_IOC_EXPORT_FOR_ARUID]] and [[#NVMAP_IOC_REMOVE_EXPORT_FOR_ARUID|NVMAP_IOC_REMOVE_EXPORT_FOR_ARUID]].
   
|-
 
|-
| 15
+
| 7 || [3.0.0+]
|
  −
|  
   
|}
 
|}
   −
Nodes [[#/dev/nvmap|/dev/nvmap]], [[#/dev/nvhost-ctrl|/dev/nvhost-ctrl]] and [[#/dev/nverpt-ctrl|/dev/nverpt-ctrl]] are always accessible.
+
== Initialize ==
 +
No input. Returns an output u32 '''Err'''.
 +
 
 +
== GetEventHandle ==
 +
No input. Returns an output Event handle and an output u32 '''Err'''.
 +
 
 +
== ControlNotification ==
 +
Takes an input bool '''Enable'''. Returns an output u32 '''Err'''.
 +
 
 +
== SetNotificationPerm ==
 +
Takes an input u64 '''Aruid''' and an input bool '''Enable'''. Returns an output u32 '''Err'''.
 +
 
 +
== SetCoreDumpPerm ==
 +
Takes an input u64 '''Aruid''' and an input bool '''Enable'''. Returns an output u32 '''Err'''.
   −
= Ioctls =
+
== GetAruid ==
The ioctl number is generated with the following primitive (see Linux kernel):
+
No input. Returns an output u64 '''Aruid''' and an output u32 '''Err'''.
   −
#define _IOC(inout, group, num, len) \
+
== Reset ==
    (inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num))
+
No input. Returns an output u32 '''Err'''.
   −
The following table contains known ioctls.
+
= nvgem:cd =
 +
This is "nv::gemcoredump::INvGemCoreDump".
   −
== /dev/nvhost-ctrl ==
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
! Value || Direction || Size || Description
+
|-
 +
! Cmd || Name
 +
|-
 +
| 0 || [[#Initialize_3|Initialize]]
 +
|-
 +
| 1 || [[#GetAruid_2|GetAruid]]
 +
|-
 +
| 2 || [1.0.0-8.1.0] [[#ReadNextBlock|ReadNextBlock]]
 +
|-
 +
| 3 || [8.0.0+]
 +
|-
 +
| 4 || [8.0.0+]
 +
|}
 +
 
 +
== Initialize ==
 +
No input. Returns an output u32 '''Err'''.
 +
 
 +
== GetAruid ==
 +
No input. Returns an output u64 '''Aruid''' and an output u32 '''Err'''.
 +
 
 +
== ReadNextBlock ==
 +
Takes a type-0x6 output buffer. Returns an output u32 '''Err'''.
 +
 
 +
= nvdbg:d =
 +
This is "nns::nvdrv::INvDrvDebugSvcServices". This was added with [10.0.0+].
 +
 
 +
This service has no commands.
 +
 
 +
= Ioctls =
 +
The ioctl number is generated with the following primitive (see Linux kernel):
 +
 
 +
#define _IOC(inout, group, num, len) \
 +
    (inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num))
 +
 
 +
The following table contains all known ioctls.
 +
 
 +
== /dev/nvhost-ctrl ==
 +
{| class="wikitable" border="1"
 +
! Value || Direction || Size || Description
 
|-
 
|-
 
| 0xC0080014 || Inout || 8 || [[#NVHOST_IOCTL_CTRL_SYNCPT_READ]]
 
| 0xC0080014 || Inout || 8 || [[#NVHOST_IOCTL_CTRL_SYNCPT_READ]]
Line 1,504: Line 1,558:  
  };
 
  };
   −
== Channels ==
+
= Channels =
Channels are a concept for NVIDIA hardware blocks that share a common interface.
+
Channels are a concept for NVIDIA hardware blocks that share a common interface.
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,523: Line 1,577:  
|}
 
|}
   −
== Channel Ioctls ==
+
== Ioctls ==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
! Value || Size || Description
 
! Value || Size || Description
Line 1,942: Line 1,996:  
   };
 
   };
   −
= nvmemp =
+
= NvDrvPermission =
This is "nv::MemoryProfiler::IMemoryProfiler".
+
This is "nns::nvdrv::NvDrvPermission".
 
+
 
/dev/nvhost-ctrl sends the ioctl NVHOST_IOCTL_CTRL_GET_CONFIG to check the config "nv!NV_MEMORY_PROFILER". If config_str returns "1", the application attempts to use nvmemp.
  −
 
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 +
!  Bits
 +
!  Name
 +
!  Description
 
|-
 
|-
! Cmd || Name
+
| 0
 +
| Gpu
 +
| Can access [[#Channels|/dev/nvhost-gpu]], [[#/dev/nvhost-ctrl-gpu|/dev/nvhost-ctrl-gpu]] and [[#/dev/nvhost-as-gpu|/dev/nvhost-as-gpu]].
 
|-
 
|-
| 0 || Open
+
| 1
 +
| GpuDebug
 +
| Can access [[#/dev/nvhost-dbg-gpu|/dev/nvhost-dbg-gpu]] and [[#/dev/nvhost-prof-gpu|/dev/nvhost-prof-gpu]].
 
|-
 
|-
| 1 || GetPid
+
| 2
|}
+
| GpuSchedule
 
+
| Can access [[#/dev/nvsched-ctrl|/dev/nvsched-ctrl]].
= nvdrvdbg =
  −
This is "nns::nvdrv::INvDrvDebugFSServices".
  −
 
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Cmd || Name
+
| 3
 +
| VIC
 +
| Can access [[#Channels|/dev/nvhost-vic]].
 
|-
 
|-
| 0 || [[#OpenDebugFS]]
+
| 4
 +
| VideoEncoder
 +
| Can access [[#Channels|/dev/nvhost-msenc]].
 
|-
 
|-
| 1 || [[#CloseDebugFS]]
+
| 5
 +
| VideoDecoder
 +
| Can access [[#Channels|/dev/nvhost-nvdec]].
 
|-
 
|-
| 2 || [[#GetDebugFSKeys]]
+
| 6
 +
| TSEC
 +
| Can access [[#Channels|/dev/nvhost-tsec]].
 
|-
 
|-
| 3 || GetDebugFSValue
+
| 7
 +
| JPEG
 +
| Can access [[#Channels|/dev/nvhost-nvjpg]].
 
|-
 
|-
| 4 || SetDebugFSValue
+
| 8
|}
+
| Display
 
+
| Can access [[#Channels|/dev/nvhost-display]], [[#/dev/nvcec-ctrl|/dev/nvcec-ctrl]], [[#/dev/nvhdcp_up-ctrl|/dev/nvhdcp_up-ctrl]], [[#/dev/nvdisp-ctrl|/dev/nvdisp-ctrl]], [[#/dev/nvdisp-disp0, /dev/nvdisp-disp1|/dev/nvdisp-disp0]], [[#/dev/nvdisp-disp0, /dev/nvdisp-disp1|/dev/nvdisp-disp1]], [[#/dev/nvdcutil-disp0, /dev/nvdcutil-disp1|/dev/nvdcutil-disp0]] and [[#/dev/nvdcutil-disp0, /dev/nvdcutil-disp1|/dev/nvdcutil-disp1]].
== OpenDebugFS ==
  −
Takes a process handle. Returns a u32 '''fd'''.
  −
 
  −
== CloseDebugFS ==
  −
Takes a u32 '''fd''' and closes it.
  −
 
  −
== GetDebugFSKeys ==
  −
Takes a u32 '''fd''' and reads debug contents into a type-6 buffer.
  −
 
  −
= nvgem:c =
  −
This is "nv::gemcontrol::INvGemControl".
  −
 
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Cmd || Name
+
| 9
 +
| ImportMemory
 +
| Can duplicate [[#/dev/nvmap|nvmap]] handles from other processes with [[#NVMAP_IOC_FROM_ID|NVMAP_IOC_FROM_ID]].
 
|-
 
|-
| 0 || Initialize
+
| 10
 +
| NoCheckedAruid
 +
| Can use [[#SetAruidWithoutCheck|SetAruidWithoutCheck]].
 
|-
 
|-
| 1 || GetEventHandle
+
| 11
 +
|
 +
| Can use [[#SetGraphicsFirmwareMemoryMarginEnabled|SetGraphicsFirmwareMemoryMarginEnabled]].
 
|-
 
|-
| 2 || ControlNotification
+
| 12
 +
|
 +
| Can duplicate exported [[#/dev/nvmap|nvmap]] handles from other processes with [[#NVMAP_IOC_FROM_ID|NVMAP_IOC_FROM_ID]].
 
|-
 
|-
| 3 || SetNotificationPerm
+
| 13
 +
|
 +
|  
 
|-
 
|-
| 4 || SetCoreDumpPerm
+
| 14
 +
|
 +
| Can use [[#NVMAP_IOC_EXPORT_FOR_ARUID|NVMAP_IOC_EXPORT_FOR_ARUID]] and [[#NVMAP_IOC_REMOVE_EXPORT_FOR_ARUID|NVMAP_IOC_REMOVE_EXPORT_FOR_ARUID]].
 
|-
 
|-
| 5 || [1.0.0-4.1.0] GetAruid
+
| 15
|-
+
|
| 6 || Reset
+
|  
|-
  −
| 7 || [3.0.0+]
   
|}
 
|}
   −
= nvgem:cd =
+
= NvError =
This is "nv::gemcoredump::INvGemCoreDump".
+
This is "nns::nvdrv::NvError".
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name
+
! Value || Name
 
|-
 
|-
| 0 || Initialize
+
| 0x0 || Success
 
|-
 
|-
| 1 || GetAruid
+
| 0x1 || NotImplemented
 
|-
 
|-
| 2 || [1.0.0-8.1.0] ReadNextBlock
+
| 0x2 || NotSupported
 
|-
 
|-
| 3 || [8.0.0+]
+
| 0x3 || NotInitialized
 
|-
 
|-
| 4 || [8.0.0+]
+
| 0x4 || BadParameter
|}
  −
 
  −
= nvdbg:d =
  −
This is "nns::nvdrv::INvDrvDebugSvcServices". This was added with [10.0.0+].
  −
 
  −
This service has no commands.
  −
 
  −
= Errors =
  −
Most nvidia driver commands return an error code apart from the normal return code.
  −
 
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Value || Name
+
| 0x5 || Timeout
 
|-
 
|-
| 0x0 || NvError_Success
+
| 0x6 || InsufficientMemory
 
|-
 
|-
| 0x1 || NvError_NotImplemented
+
| 0x7 || ReadOnlyAttribute
 
|-
 
|-
| 0x2 || NvError_NotSupported
+
| 0x8 || InvalidState
 
|-
 
|-
| 0x3 || NvError_NotInitialized
+
| 0x9 || InvalidAddress
 
|-
 
|-
| 0x4 || NvError_BadParameter
+
| 0xA || InvalidSize
 
|-
 
|-
| 0x5 || NvError_Timeout
+
| 0xB || BadValue
 
|-
 
|-
| 0x6 || NvError_InsufficientMemory
+
| 0xD || AlreadyAllocated
 
|-
 
|-
| 0x7 || NvError_ReadOnlyAttribute
+
| 0xE || Busy
 
|-
 
|-
| 0x8 || NvError_InvalidState
+
| 0xF || ResourceError
 
|-
 
|-
| 0x9 || NvError_InvalidAddress
+
| 0x10 || CountMismatch
 
|-
 
|-
| 0xA || NvError_InvalidSize
+
| 0x11 || OverFlow
 
|-
 
|-
| 0xB || NvError_BadValue
+
| 0x1000 || InsufficientTransferMemory
 
|-
 
|-
| 0xD || NvError_AlreadyAllocated
+
| 0x10000 || InsufficientVideoMemory
 
|-
 
|-
| 0xE || NvError_Busy
+
| 0x10001 || BadSurfaceColorScheme
 
|-
 
|-
| 0xF || NvError_ResourceError
+
| 0x10002 || InvalidSurface
 
|-
 
|-
| 0x10 || NvError_CountMismatch
+
| 0x10003 || SurfaceNotSupported
 
|-
 
|-
| 0x11 || NvError_OverFlow
+
| 0x20000 || DispInitFailed
 
|-
 
|-
| 0x1000 || NvError_InsufficientTransferMemory
+
| 0x20001 || DispAlreadyAttached
 
|-
 
|-
| 0x10000 || NvError_InsufficientVideoMemory
+
| 0x20002 || DispTooManyDisplays
 
|-
 
|-
| 0x10001 || NvError_BadSurfaceColorScheme
+
| 0x20003 || DispNoDisplaysAttached
 
|-
 
|-
| 0x10002 || NvError_InvalidSurface
+
| 0x20004 || DispModeNotSupported
 
|-
 
|-
| 0x10003 || NvError_SurfaceNotSupported
+
| 0x20005 || DispNotFound
 
|-
 
|-
| 0x20000 || NvError_DispInitFailed
+
| 0x20006 || DispAttachDissallowed
 
|-
 
|-
| 0x20001 || NvError_DispAlreadyAttached
+
| 0x20007 || DispTypeNotSupported
 
|-
 
|-
| 0x20002 || NvError_DispTooManyDisplays
+
| 0x20008 || DispAuthenticationFailed
 
|-
 
|-
| 0x20003 || NvError_DispNoDisplaysAttached
+
| 0x20009 || DispNotAttached
 
|-
 
|-
| 0x20004 || NvError_DispModeNotSupported
+
| 0x2000A || DispSamePwrState
 
|-
 
|-
| 0x20005 || NvError_DispNotFound
+
| 0x2000B || DispEdidFailure
 
|-
 
|-
| 0x20006 || NvError_DispAttachDissallowed
+
| 0x2000C || DispDsiReadAckError
 
|-
 
|-
| 0x20007 || NvError_DispTypeNotSupported
+
| 0x2000D || DispDsiReadInvalidResp
 
|-
 
|-
| 0x20008 || NvError_DispAuthenticationFailed
+
| 0x30000 || FileWriteFailed
 
|-
 
|-
| 0x20009 || NvError_DispNotAttached
+
| 0x30001 || FileReadFailed
 
|-
 
|-
| 0x2000A || NvError_DispSamePwrState
+
| 0x30002 || EndOfFile
 
|-
 
|-
| 0x2000B || NvError_DispEdidFailure
+
| 0x30003 || FileOperationFailed
 
|-
 
|-
| 0x2000C || NvError_DispDsiReadAckError
+
| 0x30004 || DirOperationFailed
 
|-
 
|-
| 0x2000D || NvError_DispDsiReadInvalidResp
+
| 0x30005 || EndOfDirList
 
|-
 
|-
| 0x30000 || NvError_FileWriteFailed
+
| 0x30006 || ConfigVarNotFound
 
|-
 
|-
| 0x30001 || NvError_FileReadFailed
+
| 0x30007 || InvalidConfigVar
 
|-
 
|-
| 0x30002 || NvError_EndOfFile
+
| 0x30008 || LibraryNotFound
 
|-
 
|-
| 0x30003 || NvError_FileOperationFailed
+
| 0x30009 || SymbolNotFound
 
|-
 
|-
| 0x30004 || NvError_DirOperationFailed
+
| 0x3000A || MemoryMapFailed
 
|-
 
|-
| 0x30005 || NvError_EndOfDirList
+
| 0x3000F || IoctlFailed                       
 
|-
 
|-
| 0x30006 || NvError_ConfigVarNotFound
+
| 0x30010 || AccessDenied
 
|-
 
|-
| 0x30007 || NvError_InvalidConfigVar
+
| 0x30011 || DeviceNotFound
 
|-
 
|-
| 0x30008 || NvError_LibraryNotFound
+
| 0x30012 || KernelDriverNotFound
 
|-
 
|-
| 0x30009 || NvError_SymbolNotFound
+
| 0x30013 || FileNotFound
 
|-
 
|-
| 0x3000A || NvError_MemoryMapFailed
+
| 0x30014 || PathAlreadyExists
 
|-
 
|-
| 0x3000F || NvError_IoctlFailed                       
+
| 0xA000E || ModuleNotPresent
 +
|}
 +
 
 +
= NvDrvStatus =
 +
This is "nns::nvdrv::NvDrvStatus".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x30010 || NvError_AccessDenied
+
! Offset
 +
! Size
 +
! Description
 
|-
 
|-
| 0x30011 || NvError_DeviceNotFound
+
| 0x0
 +
| 0x4
 +
| FreeSize
 
|-
 
|-
| 0x30012 || NvError_KernelDriverNotFound
+
| 0x4
 +
| 0x4
 +
| AllocatableSize
 
|-
 
|-
| 0x30013 || NvError_FileNotFound
+
| 0x8
 +
| 0x4
 +
| MinimumFreeSize
 
|-
 
|-
| 0x30014 || NvError_PathAlreadyExists
+
| 0xC
 +
| 0x4
 +
| MinimumAllocatableSize
 
|-
 
|-
| 0xA000E || NvError_ModuleNotPresent
+
| 0x10
 +
| 0x10
 +
| Reserved
 
|}
 
|}
   −
= Panic =
+
= Notes =
 
In some cases, a panic may occur. NV forces a crash by doing:
 
In some cases, a panic may occur. NV forces a crash by doing:
 
  (void *)0 = 0xCAFE;
 
  (void *)0 = 0xCAFE;
 
End result is that the system hangs with a white-screen.
 
End result is that the system hangs with a white-screen.
   −
== Gpfifo Panic ==
   
When the gpfifo data in the gpu_va buffers specified by the submitted gpfifo entries is invalid(?), eventually the user-process will be force-terminated after using the submit-gpfifo ioctl. It's unknown how exactly this is done.
 
When the gpfifo data in the gpu_va buffers specified by the submitted gpfifo entries is invalid(?), eventually the user-process will be force-terminated after using the submit-gpfifo ioctl. It's unknown how exactly this is done.
    
[[Category:Services]]
 
[[Category:Services]]

Navigation menu