NV services: Difference between revisions

(13 intermediate revisions by 5 users not shown)
Line 30: Line 30:
| 6 || [[#GetStatus]]
| 6 || [[#GetStatus]]
|-
|-
| 7 || [[#ForceSetClientPID]]
| 7 || [[#SetAruid]]
|-
|-
| 8 || [[#SetClientPID]]
| 8 || [[#SetAruidByPID]]
|-
|-
| 9 || [[#DumpGraphicsMemoryInfo]]
| 9 || [[#DumpGraphicsMemoryInfo]]
Line 42: Line 42:
| 12 || [3.0.0+] [[#Ioctl3]]
| 12 || [3.0.0+] [[#Ioctl3]]
|-
|-
| 13 || [3.0.0+]
| 13 || [3.0.0+] [[#FinishInitialize]]
|}
|}


Line 84: Line 84:
Takes no input. Returns 0x10-bytes and an output u32 ('''error_code''').
Takes no input. Returns 0x10-bytes and an output u32 ('''error_code''').


== ForceSetClientPID ==
== SetAruid ==
Takes an input u64 which must [[IPC_Marshalling|match]] the user-process PID ([[AM_services|AppletResourceUserId]]). Returns an output u32 ('''error_code''').
Takes an input u64 which must [[IPC_Marshalling|match]] the user-process PID ([[AM_services|AppletResourceUserId]]). Returns an output u32 ('''error_code''').


== SetClientPID ==
== SetAruidByPID ==
Takes a PID-descriptor and an u64 which must [[IPC_Marshalling|match]] the user-process PID ([[AM_services|AppletResourceUserId]]). Returns an output u32 ('''error_code''').
Takes a PID-descriptor and an u64 which must [[IPC_Marshalling|match]] the user-process PID ([[AM_services|AppletResourceUserId]]). Returns an output u32 ('''error_code''').


Line 100: Line 100:


== Ioctl3 ==
== Ioctl3 ==
Same input/output as Ioctl2, except cmdhdr_word1 is 0x100B instead of 0xC0B.
Takes a type-0x21 buffer, a type-0x22 buffer, another type-0x22 buffer, and two input u32s. Returns an output u32 (error_code).
Cmdhdr_word1 is 0x100B instead of 0xC0B.


== Cmd13 ==
== FinishInitialize ==
Takes an input u64. No output.
Takes an input u64. No output.
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.
Official user-processes starting with 3.0.0 now use this at the end of nvdrv service init with value 0x1.
Line 342: Line 345:
     __in u8  kind;
     __in u8  kind;
     u8      pad[7];
     u8      pad[7];
     __in u64 addr;
     __inout u64 addr;
   };
   };


Line 383: Line 386:
| 0xC1100214 || Inout || 272 || TEGRA_DC_EXT_CONTROL_GET_OUTPUT_EDID ||
| 0xC1100214 || Inout || 272 || TEGRA_DC_EXT_CONTROL_GET_OUTPUT_EDID ||
|-
|-
| 0xC0040216 || Inout || 4 || TEGRA_DC_EXT_CONTROL_SET_EVENT0 ||
| 0xC0040216 || Inout || 4 || TEGRA_DC_EXT_CONTROL_GET_EXT_HPD_IN_EVENT ||
|-
| 0xC0040217 || Inout || 4 || TEGRA_DC_EXT_CONTROL_SET_EVENT1 ||
|-
|-
| 0xC0100218 || Inout || 16 || TEGRA_DC_EXT_CONTROL_SET_EVENT2 ||
| 0xC0040217 || Inout || 4 || TEGRA_DC_EXT_CONTROL_GET_EXT_HPD_OUT_EVENT ||
|-
|-
| 0xC0100219 || Inout || 16 || TEGRA_DC_EXT_CONTROL_SET_EVENT3 ||
| 0xC0100218 || Inout || 16 || TEGRA_DC_EXT_CONTROL_GET_VBLANK_HEAD0_EVENT ||
|-
|-
| 0xC0040220 || Inout || 4 || TEGRA_DC_EXT_CONTROL_SET_EVENT4 ||
| 0xC0100219 || Inout || 16 || TEGRA_DC_EXT_CONTROL_GET_VBLANK_HEAD1_EVENT ||
|-
|-
| 0xC0040220 || Inout || 4 || TEGRA_DC_EXT_CONTROL_GET_UNK_EVENT ||
|}
|}


Line 1,045: Line 1,047:
| 0x40080008 || 8 || NVHOST_IOCTL_CHANNEL_SET_CLK_RATE || Seen on 1.0.0.
| 0x40080008 || 8 || NVHOST_IOCTL_CHANNEL_SET_CLK_RATE || Seen on 1.0.0.
|-
|-
| 0xC0??0009 || Variable || NVHOST_IOCTL_CHANNEL_MAP_BUFFER || Seen on 1.0.0.
| 0xC0??0009 || Variable || NVHOST_IOCTL_CHANNEL_MAP_CMD_BUFFER || Seen on 1.0.0.
|-
|-
| 0xC0??000A || Variable || NVHOST_IOCTL_CHANNEL_UNMAP_BUFFER || Seen on 1.0.0.
| 0xC0??000A || Variable || NVHOST_IOCTL_CHANNEL_UNMAP_CMD_BUFFER || Seen on 1.0.0.
|-
|-
| 0x00000013 || 0 || || Seen on 1.0.0. This one sets a u32, and bool based on input.
| 0x00000013 || 0 || || Seen on 1.0.0. This one sets a u32, and bool based on input.
Line 1,259: Line 1,261:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || Cmd0
| 0 || Open
|-
|-
| 1 || Cmd1
| 1 || GetPid
|}
|}


Line 1,276: Line 1,278:
|-
|-
| 2 || [[#ReadLog]]
| 2 || [[#ReadLog]]
|-
| 3 ||
|-
| 4 ||
|}
|}


Line 1,304: Line 1,310:
| 4 ||
| 4 ||
|-
|-
| 5 ||
| [1.0.0-4.1.0] 5 ||
|-
|-
| 6 ||
| 6 ||
|-
|-
| 7 ||
| 7 || [3.0.0+]
|}
|}


Line 1,323: Line 1,329:
|-
|-
| 2 ||
| 2 ||
|-
| 3 || [8.0.0+]
|-
| 4 || [8.0.0+]
|}
|}