diff options
| author | 2021-05-08 02:20:15 -0700 | |
|---|---|---|
| committer | 2021-05-10 15:05:10 -0700 | |
| commit | 7a06037c5fd2e4ee968ca89869000a0758d38da3 (patch) | |
| tree | de6f94038b8254724fda2d1badd81ab7b884227d /src | |
| parent | hle: kernel: Further cleanup and add TIPC helpers. (diff) | |
| download | yuzu-7a06037c5fd2e4ee968ca89869000a0758d38da3.tar.gz yuzu-7a06037c5fd2e4ee968ca89869000a0758d38da3.tar.xz yuzu-7a06037c5fd2e4ee968ca89869000a0758d38da3.zip | |
hle: ipc: Add declarations for TIPC.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/ipc.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/core/hle/ipc.h b/src/core/hle/ipc.h index 55b1716e4..602e12606 100644 --- a/src/core/hle/ipc.h +++ b/src/core/hle/ipc.h | |||
| @@ -32,7 +32,8 @@ enum class CommandType : u32 { | |||
| 32 | Control = 5, | 32 | Control = 5, |
| 33 | RequestWithContext = 6, | 33 | RequestWithContext = 6, |
| 34 | ControlWithContext = 7, | 34 | ControlWithContext = 7, |
| 35 | Unspecified, | 35 | TIPC_Close = 15, |
| 36 | TIPC_CommandRegion = 16, // Start of TIPC commands, this is an offset. | ||
| 36 | }; | 37 | }; |
| 37 | 38 | ||
| 38 | struct CommandHeader { | 39 | struct CommandHeader { |
| @@ -57,6 +58,20 @@ struct CommandHeader { | |||
| 57 | BitField<10, 4, BufferDescriptorCFlag> buf_c_descriptor_flags; | 58 | BitField<10, 4, BufferDescriptorCFlag> buf_c_descriptor_flags; |
| 58 | BitField<31, 1, u32> enable_handle_descriptor; | 59 | BitField<31, 1, u32> enable_handle_descriptor; |
| 59 | }; | 60 | }; |
| 61 | |||
| 62 | bool IsTipc() const { | ||
| 63 | return type.Value() >= CommandType::TIPC_CommandRegion; | ||
| 64 | } | ||
| 65 | |||
| 66 | bool IsCloseCommand() const { | ||
| 67 | switch (type.Value()) { | ||
| 68 | case CommandType::Close: | ||
| 69 | case CommandType::TIPC_Close: | ||
| 70 | return true; | ||
| 71 | default: | ||
| 72 | return false; | ||
| 73 | } | ||
| 74 | } | ||
| 60 | }; | 75 | }; |
| 61 | static_assert(sizeof(CommandHeader) == 8, "CommandHeader size is incorrect"); | 76 | static_assert(sizeof(CommandHeader) == 8, "CommandHeader size is incorrect"); |
| 62 | 77 | ||