Changes

74 bytes added ,  16:54, 13 August 2020
no edit summary
Line 34: Line 34:  
| 6 || [[#GetStatus]]
 
| 6 || [[#GetStatus]]
 
|-
 
|-
| 7 || [[#SetAruidForTest]]
+
| 7 || [[#SetAruidWithoutCheck]]
 
|-
 
|-
 
| 8 || [[#SetAruid]]
 
| 8 || [[#SetAruid]]
Line 88: Line 88:  
Takes no input. Returns 0x10-bytes and an output u32 ('''error_code''').
 
Takes no input. Returns 0x10-bytes and an output u32 ('''error_code''').
   −
== SetAruidForTest ==
+
== 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 which must [[IPC_Marshalling|match]] the user-process PID ([[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]]). Returns an output u32 ('''error_code''').
   Line 152: Line 152:  
|-
 
|-
 
| 10
 
| 10
| Can use [[#SetAruidForTest|SetAruidForTest]].
+
| Can use [[#SetAruidWithoutCheck|SetAruidWithoutCheck]].
 
|-
 
|-
 
| 11
 
| 11
Line 203: Line 203:  
| 0xC183001B || Inout || 387 || [[#NVHOST_IOCTL_CTRL_GET_CONFIG]]
 
| 0xC183001B || Inout || 387 || [[#NVHOST_IOCTL_CTRL_GET_CONFIG]]
 
|-
 
|-
| 0xC004001C || Inout || 4 || [[#NVHOST_IOCTL_CTRL_EVENT_SIGNAL]]
+
| 0xC004001C || Inout || 4 || [[#NVHOST_IOCTL_CTRL_SYNCPT_CLEAR_EVENT_WAIT]]
 
|-
 
|-
| 0xC010001D || Inout || 16 || [[#NVHOST_IOCTL_CTRL_EVENT_WAIT]]
+
| 0xC010001D || Inout || 16 || [[#NVHOST_IOCTL_CTRL_SYNCPT_EVENT_WAIT]]
 
|-
 
|-
| 0xC010001E || Inout || 16 || [[#NVHOST_IOCTL_CTRL_EVENT_WAIT_ASYNC]]
+
| 0xC010001E || Inout || 16 || [[#NVHOST_IOCTL_CTRL_SYNCPT_EVENT_WAIT_ASYNC]]
 
|-
 
|-
| 0xC004001F || Inout || 4 || [[#NVHOST_IOCTL_CTRL_EVENT_REGISTER]]
+
| 0xC004001F || Inout || 4 || [[#NVHOST_IOCTL_CTRL_SYNCPT_REGISTER_EVENT]]
 
|-
 
|-
| 0xC0040020 || Inout || 4 || [[#NVHOST_IOCTL_CTRL_EVENT_UNREGISTER]]
+
| 0xC0040020 || Inout || 4 || [[#NVHOST_IOCTL_CTRL_SYNCPT_UNREGISTER_EVENT]]
 
|-
 
|-
| 0x40080021 || In || 8 || [[#NVHOST_IOCTL_CTRL_EVENT_KILL]]
+
| 0x40080021 || In || 8 || [[#NVHOST_IOCTL_CTRL_SYNCPT_FREE_EVENTS]]
 
|-
 
|-
 
| 0xC0040022 || Inout || 4 || [[#NVHOST_IOCTL_CTRL_GET_MAX_EVENT_FIFO_CHANNEL]]
 
| 0xC0040022 || Inout || 4 || [[#NVHOST_IOCTL_CTRL_GET_MAX_EVENT_FIFO_CHANNEL]]
Line 289: Line 289:  
   };
 
   };
   −
=== NVHOST_IOCTL_CTRL_EVENT_SIGNAL ===
+
=== NVHOST_IOCTL_CTRL_SYNCPT_CLEAR_EVENT_WAIT ===
Signals an user event. Exclusive to the Switch.
+
Clears the wait signal of an event. Exclusive to the Switch.
    
   struct {
 
   struct {
     __in u32 user_event_id;     // ranges from 0x00 to 0x3F
+
     __in u32 event_slot;         // ranges from 0x00 to 0x3F
 
   };
 
   };
   −
=== NVHOST_IOCTL_CTRL_EVENT_WAIT ===
+
=== NVHOST_IOCTL_CTRL_SYNCPT_EVENT_WAIT ===
 
Waits on an event. If waiting fails, returns error code 0x05 (Timeout) and sets '''value''' to (('''syncpt_id''' << 0x10) | 0x10000000).
 
Waits on an event. If waiting fails, returns error code 0x05 (Timeout) and sets '''value''' to (('''syncpt_id''' << 0x10) | 0x10000000).
   −
Depending on '''threshold''', an '''user_event_id''' may be returned for using with other event ioctls.
+
Depending on '''threshold''', an '''event_slot''' may be returned for using with other event ioctls.
    
   struct {
 
   struct {
Line 305: Line 305:  
     __in    u32 threshold;
 
     __in    u32 threshold;
 
     __in    s32 timeout;
 
     __in    s32 timeout;
     __inout u32 value;          // in=user_event_id (ignored); out=syncpt_value or user_event_id
+
     __inout u32 value;          // in=event_slot (ignored); out=syncpt_value or event_slot
 
   };
 
   };
   −
=== NVHOST_IOCTL_CTRL_EVENT_WAIT_ASYNC ===
+
=== NVHOST_IOCTL_CTRL_SYNCPT_EVENT_WAIT_ASYNC ===
 
Waits on an event (async version). If waiting fails, returns error code 0x0B (BadValue).
 
Waits on an event (async version). If waiting fails, returns error code 0x0B (BadValue).
   −
Depending on '''threshold''', an '''user_event_id''' may be returned for using with other event ioctls.
+
Depending on '''threshold''', an '''event_slot''' may be returned for using with other event ioctls.
    
   struct {
 
   struct {
Line 317: Line 317:  
     __in    u32 threshold;
 
     __in    u32 threshold;
 
     __in    u32 timeout;
 
     __in    u32 timeout;
     __inout u32 value;          // in=user_event_id (ignored); out=syncpt_value or user_event_id
+
     __inout u32 value;          // in=event_slot (ignored); out=syncpt_value or event_slot
 
   };
 
   };
   −
=== NVHOST_IOCTL_CTRL_EVENT_REGISTER ===
+
=== NVHOST_IOCTL_CTRL_SYNCPT_REGISTER_EVENT ===
Registers an user event. Exclusive to the Switch.  
+
Registers an event. Exclusive to the Switch.  
    
   struct {
 
   struct {
     __in u32 user_event_id;     // ranges from 0x00 to 0x3F
+
     __in u32 event_slot;         // ranges from 0x00 to 0x3F
 
   };
 
   };
   −
=== NVHOST_IOCTL_CTRL_EVENT_UNREGISTER ===
+
=== NVHOST_IOCTL_CTRL_SYNCPT_UNREGISTER_EVENT ===
Unregisters an user event. Exclusive to the Switch.  
+
Unregisters an event. Exclusive to the Switch.  
    
   struct {
 
   struct {
     __in u32 user_event_id;     // ranges from 0x00 to 0x3F
+
     __in u32 event_slot;         // ranges from 0x00 to 0x3F
 
   };
 
   };
   −
=== NVHOST_IOCTL_CTRL_EVENT_KILL ===
+
=== NVHOST_IOCTL_CTRL_SYNCPT_FREE_EVENTS ===
Kills user events. Exclusive to the Switch.  
+
Frees events. Exclusive to the Switch.  
    
   struct {
 
   struct {
     __in u64 user_events;       // 64-bit bitfield where each bit represents one event
+
     __in u64 events;             // 64-bit bitfield where each bit represents one event
 
   };
 
   };
   Line 345: Line 345:     
   struct {
 
   struct {
     __out u32 max_channel;     // 0x00 (FIFO disabled) or 0x60 (FIFO enabled)
+
     __out u32 max_channel;       // 0x00 (FIFO disabled) or 0x60 (FIFO enabled)
 
   };
 
   };
   Line 514: Line 514:  
! Value || Direction || Size || Description
 
! Value || Direction || Size || Description
 
|-
 
|-
| 0x80040212 || Out || 4 || NVDISP_CTRL_GET_NUM_OUTPUTS
+
| 0x80040212 || Out || 4 || NVDISP_CTRL_NUM_OUTPUTS
 
|-
 
|-
| 0xC0140213 || Inout || 20 || NVDISP_CTRL_GET_OUTPUT_PROPERTIES
+
| 0xC0140213 || Inout || 20 || NVDISP_CTRL_GET_DISPLAY_PROPERTIES
 
|-
 
|-
| 0xC1100214 || Inout || 272 || NVDISP_CTRL_GET_OUTPUT_EDID
+
| 0xC1100214 || Inout || 272 || NVDISP_CTRL_QUERY_EDID
 
|-
 
|-
 
| 0xC0080216</br>([1.0.0-3.0.0] 0xC0040216) || Inout || 8</br>([1.0.0-3.0.0] 4) || NVDISP_CTRL_GET_EXT_HPD_IN_OUT_EVENTS</br>([1.0.0-3.0.0] NVDISP_CTRL_GET_EXT_HPD_IN_EVENT)
 
| 0xC0080216</br>([1.0.0-3.0.0] 0xC0040216) || Inout || 8</br>([1.0.0-3.0.0] 4) || NVDISP_CTRL_GET_EXT_HPD_IN_OUT_EVENTS</br>([1.0.0-3.0.0] NVDISP_CTRL_GET_EXT_HPD_IN_EVENT)
Line 528: Line 528:  
| 0xC0100219 || Inout || 16 || NVDISP_CTRL_GET_VBLANK_HEAD1_EVENT
 
| 0xC0100219 || Inout || 16 || NVDISP_CTRL_GET_VBLANK_HEAD1_EVENT
 
|-
 
|-
| 0xC0040220 || Inout || 4 || NVDISP_CTRL_GET_HPD_IRQ
+
| 0xC0040220 || Inout || 4 || NVDISP_CTRL_SUSPEND
 
|}
 
|}
   Line 547: Line 547:  
| 0x430C0206 || In || 780 || NVDISP_SET_LUT
 
| 0x430C0206 || In || 780 || NVDISP_SET_LUT
 
|-
 
|-
| 0x40010207 || In || 1 || NVDISP_ENABLE_DISABLE_CRC
+
| 0x40010207 || In || 1 || NVDISP_CONFIG_CRC
 
|-
 
|-
 
| 0x80040208 || Out || 4 || NVDISP_GET_CRC
 
| 0x80040208 || Out || 4 || NVDISP_GET_CRC
Line 611: Line 611:  
! Value || Direction || Size || Description
 
! Value || Direction || Size || Description
 
|-
 
|-
| 0xC4880401 || Inout || 1160 || NVHDCP_READ_M
+
| 0xC4880401 || Inout || 1160 || NVHDCP_READ_STATUS
 
|-
 
|-
| 0xC4880402 || Inout || 1160 || NVHDCP_READ_S
+
| 0xC4880402 || Inout || 1160 || NVHDCP_READ_M
 
|-
 
|-
| 0x40010403 || In || 1 || NVHDCP_ON_OFF
+
| 0x40010403 || In || 1 || NVHDCP_USER_ENABLE
 
|-
 
|-
 
| 0xC0080404 || Inout || 8 || NVHDCP_READ_EVENT
 
| 0xC0080404 || Inout || 8 || NVHDCP_READ_EVENT
 
|-
 
|-
| 0xC0010405 || Inout || 1 || NVHDCP_EVENTS_ON_OFF
+
| 0xC0010405 || Inout || 1 || NVHDCP_EVENTS_ENABLE
 
|}
 
|}
   Line 626: Line 626:  
! Value || Direction || Size || Description
 
! Value || Direction || Size || Description
 
|-
 
|-
| 0x40010501 || In || 1 || NVDCUTIL_SW_HOTPLUG_IN_OUT
+
| 0x40010501 || In || 1 || NVDCUTIL_SW_HOTPLUG
 
|-
 
|-
| 0x40010502 || In || 1 || NVDCUTIL_VIRTUAL_EDID_ON_OFF
+
| 0x40010502 || In || 1 || NVDCUTIL_VIRTUAL_EDID_ENABLE
 
|-
 
|-
 
| 0x42040503 || In || 1056 || NVDCUTIL_VIRTUAL_EDID_SET_DATA
 
| 0x42040503 || In || 1056 || NVDCUTIL_VIRTUAL_EDID_SET_DATA
Line 634: Line 634:  
| 0x803C0504 || Out || 60 || NVDCUTIL_GET_MODE
 
| 0x803C0504 || Out || 60 || NVDCUTIL_GET_MODE
 
|-
 
|-
| 0x40010505 || In || 1 || NVDCUTIL_TELEMETRY_TEST_ON_OFF
+
| 0x40010505 || In || 1 || NVDCUTIL_TELEMETRY_TEST_ENABLE
 
|-
 
|-
 
| 0x400C0506 || In || 12 || NVDCUTIL_DSI_PACKET_SHORT_WRITE
 
| 0x400C0506 || In || 12 || NVDCUTIL_DSI_PACKET_SHORT_WRITE
Line 685: Line 685:  
| 0x4008060F || In || 8 || [[#NVSCHED_CTRL_DETACH_APPLICATION]]
 
| 0x4008060F || In || 8 || [[#NVSCHED_CTRL_DETACH_APPLICATION]]
 
|-
 
|-
| 0x40100610 || In || 16 || NVSCHED_CTRL_LINK_RUNLIST_EX
+
| 0x40100610 || In || 16 || NVSCHED_CTRL_SET_APPLICATION_MAX_DEBT
 
|-
 
|-
| 0x40100611 || In || 16 || NVSCHED_CTRL_UNLINK_RUNLIST_EX
+
| 0x40100611 || In || 16 || NVSCHED_CTRL_SET_RUNLIST_MAX_DEBT
 
|-
 
|-
| 0x40010612 || In || 1 || NVSCHED_CTRL_OVERRUN_EVENTS_ON_OFF
+
| 0x40010612 || In || 1 || NVSCHED_CTRL_OVERRUN_EVENTS_ENABLE
 
|}
 
|}
   Line 887: Line 887:  
| 0xC0284106 || Inout || 40 || [[#NVGPU_AS_IOCTL_MODIFY]]
 
| 0xC0284106 || Inout || 40 || [[#NVGPU_AS_IOCTL_MODIFY]]
 
|-
 
|-
| 0x40104107 || In || 16 || [[#NVGPU_AS_IOCTL_INITIALIZE]]
+
| 0x40104107 || In || 16 || [[#NVGPU_AS_IOCTL_ALLOC_AS]]
 
|-
 
|-
 
| 0xC0404108 || Inout || 64 || [[#NVGPU_AS_IOCTL_GET_VA_REGIONS]]
 
| 0xC0404108 || Inout || 64 || [[#NVGPU_AS_IOCTL_GET_VA_REGIONS]]
 
|-
 
|-
| 0x40284109 || In || 40 || [[#NVGPU_AS_IOCTL_INITIALIZE_EX]]
+
| 0x40284109 || In || 40 || [[#NVGPU_AS_IOCTL_ALLOC_AS_EX]]
 
|-
 
|-
 
| 0xC038410A || Inout || 56 || [[#NVGPU_AS_IOCTL_MAP_BUFFER_EX]]
 
| 0xC038410A || Inout || 56 || [[#NVGPU_AS_IOCTL_MAP_BUFFER_EX]]
Line 968: Line 968:  
   };
 
   };
   −
=== NVGPU_AS_IOCTL_INITIALIZE ===
+
=== NVGPU_AS_IOCTL_ALLOC_AS ===
Nintendo's custom implementation of NVGPU_GPU_IOCTL_ALLOC_AS (unavailable).
+
Nintendo's custom implementation for allocating an address space.
    
   struct {
 
   struct {
Line 995: Line 995:  
   };
 
   };
   −
=== NVGPU_AS_IOCTL_INITIALIZE_EX ===
+
=== NVGPU_AS_IOCTL_ALLOC_AS_EX ===
Nintendo's custom implementation of NVGPU_GPU_IOCTL_ALLOC_AS (unavailable) with extra params.
+
Nintendo's custom implementation for allocating an address space with extra params.
    
   struct {
 
   struct {
Line 1,927: Line 1,927:  
| 0 || Initialize
 
| 0 || Initialize
 
|-
 
|-
| 1 || GetGemEvent
+
| 1 || GetEventHandle
 
|-
 
|-
| 2 ||  
+
| 2 || ControlNotification
 
|-
 
|-
| 3 || RegisterUnregisterAppIdLocked
+
| 3 || SetNotificationPerm
 
|-
 
|-
| 4 ||
+
| 4 || SetCoreDumpPerm
 
|-
 
|-
 
| 5 || [1.0.0-4.1.0] GetAruid
 
| 5 || [1.0.0-4.1.0] GetAruid
 
|-
 
|-
| 6 || HandleDeferredErrors
+
| 6 || Reset
 
|-
 
|-
 
| 7 || [3.0.0+]
 
| 7 || [3.0.0+]
Line 1,953: Line 1,953:  
| 1 || GetAruid
 
| 1 || GetAruid
 
|-
 
|-
| 2 || [1.0.0-8.1.0] ReadNextCdBlock
+
| 2 || [1.0.0-8.1.0] ReadNextBlock
 
|-
 
|-
 
| 3 || [8.0.0+]
 
| 3 || [8.0.0+]