summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_ctrl.h88
1 files changed, 86 insertions, 2 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h
index 76a8b33c2..aa9b5a14b 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h
+++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h
@@ -26,12 +26,64 @@ private:
26 IocSyncptIncrCommand = 0x40040015, 26 IocSyncptIncrCommand = 0x40040015,
27 IocSyncptWaitCommand = 0xC00C0016, 27 IocSyncptWaitCommand = 0xC00C0016,
28 IocModuleMutexCommand = 0x40080017, 28 IocModuleMutexCommand = 0x40080017,
29 IocModuleRegRDWRCommand = 0xC008010E, 29 IocModuleRegRDWRCommand = 0xC0180018,
30 IocSyncptWaitexCommand = 0xC0100019, 30 IocSyncptWaitexCommand = 0xC0100019,
31 IocSyncptReadMaxCommand = 0xC008001A, 31 IocSyncptReadMaxCommand = 0xC008001A,
32 IocCtrlEventWaitCommand = 0xC010001D,
33 IocGetConfigCommand = 0xC183001B, 32 IocGetConfigCommand = 0xC183001B,
33 IocCtrlEventSignalCommand = 0xC004001C,
34 IocCtrlEventWaitCommand = 0xC010001D,
35 IocCtrlEventWaitAsyncCommand = 0xC010001E,
36 IocCtrlEventRegisterCommand = 0xC004001F,
37 IocCtrlEventUnregisterCommand = 0xC0040020,
38 IocCtrlEventKillCommand = 0x40080021,
39 };
40 struct IocSyncptReadParams {
41 u32_le id;
42 u32_le value;
43 };
44 static_assert(sizeof(IocSyncptReadParams) == 8, "IocSyncptReadParams is incorrect size");
45
46 struct IocSyncptIncrParams {
47 u32_le id;
48 };
49 static_assert(sizeof(IocSyncptIncrParams) == 4, "IocSyncptIncrParams is incorrect size");
50
51 struct IocSyncptWaitParams {
52 u32_le id;
53 u32_le thresh;
54 s32_le timeout;
55 };
56 static_assert(sizeof(IocSyncptWaitParams) == 12, "IocSyncptWaitParams is incorrect size");
57
58 struct IocModuleMutexParams {
59 u32_le id;
60 u32_le lock; // (0 = unlock and 1 = lock)
61 };
62 static_assert(sizeof(IocModuleMutexParams) == 8, "IocModuleMutexParams is incorrect size");
63
64 struct IocModuleRegRDWRParams {
65 u32_le id;
66 u32_le num_offsets;
67 u32_le block_size;
68 u32_le offsets;
69 u32_le values;
70 u32_le write;
71 };
72 static_assert(sizeof(IocModuleRegRDWRParams) == 24, "IocModuleRegRDWRParams is incorrect size");
73
74 struct IocSyncptWaitexParams {
75 u32_le id;
76 u32_le thresh;
77 s32_le timeout;
78 u32_le value;
34 }; 79 };
80 static_assert(sizeof(IocSyncptWaitexParams) == 16, "IocSyncptWaitexParams is incorrect size");
81
82 struct IocSyncptReadMaxParams {
83 u32_le id;
84 u32_le value;
85 };
86 static_assert(sizeof(IocSyncptReadMaxParams) == 8, "IocSyncptReadMaxParams is incorrect size");
35 87
36 struct IocGetConfigParams { 88 struct IocGetConfigParams {
37 std::array<char, 0x41> domain_str; 89 std::array<char, 0x41> domain_str;
@@ -40,6 +92,12 @@ private:
40 }; 92 };
41 static_assert(sizeof(IocGetConfigParams) == 387, "IocGetConfigParams is incorrect size"); 93 static_assert(sizeof(IocGetConfigParams) == 387, "IocGetConfigParams is incorrect size");
42 94
95 struct IocCtrlEventSignalParams {
96 u32_le user_event_id;
97 };
98 static_assert(sizeof(IocCtrlEventSignalParams) == 4,
99 "IocCtrlEventSignalParams is incorrect size");
100
43 struct IocCtrlEventWaitParams { 101 struct IocCtrlEventWaitParams {
44 u32_le syncpt_id; 102 u32_le syncpt_id;
45 u32_le threshold; 103 u32_le threshold;
@@ -48,6 +106,32 @@ private:
48 }; 106 };
49 static_assert(sizeof(IocCtrlEventWaitParams) == 16, "IocCtrlEventWaitParams is incorrect size"); 107 static_assert(sizeof(IocCtrlEventWaitParams) == 16, "IocCtrlEventWaitParams is incorrect size");
50 108
109 struct IocCtrlEventWaitAsyncParams {
110 u32_le syncpt_id;
111 u32_le threshold;
112 u32_le timeout;
113 u32_le value;
114 };
115 static_assert(sizeof(IocCtrlEventWaitAsyncParams) == 16,
116 "IocCtrlEventWaitAsyncParams is incorrect size");
117
118 struct IocCtrlEventRegisterParams {
119 u32_le user_event_id;
120 };
121 static_assert(sizeof(IocCtrlEventRegisterParams) == 4,
122 "IocCtrlEventRegisterParams is incorrect size");
123
124 struct IocCtrlEventUnregisterParams {
125 u32_le user_event_id;
126 };
127 static_assert(sizeof(IocCtrlEventUnregisterParams) == 4,
128 "IocCtrlEventUnregisterParams is incorrect size");
129
130 struct IocCtrlEventKill {
131 u64_le user_events;
132 };
133 static_assert(sizeof(IocCtrlEventKill) == 8, "IocCtrlEventKill is incorrect size");
134
51 u32 NvOsGetConfigU32(const std::vector<u8>& input, std::vector<u8>& output); 135 u32 NvOsGetConfigU32(const std::vector<u8>& input, std::vector<u8>& output);
52 136
53 u32 IocCtrlEventWait(const std::vector<u8>& input, std::vector<u8>& output); 137 u32 IocCtrlEventWait(const std::vector<u8>& input, std::vector<u8>& output);