summaryrefslogtreecommitdiffstats
path: root/src/core/hle/ipc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/ipc.h')
-rw-r--r--src/core/hle/ipc.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/core/hle/ipc.h b/src/core/hle/ipc.h
index ec08be0f4..1840fac12 100644
--- a/src/core/hle/ipc.h
+++ b/src/core/hle/ipc.h
@@ -19,7 +19,6 @@ constexpr size_t COMMAND_BUFFER_LENGTH = 0x100 / sizeof(u32);
// TODO(yuriks): These will probably go away once translation is implemented inside the kernel.
constexpr auto ERR_INVALID_HANDLE = Kernel::ERR_INVALID_HANDLE_OS;
-
enum class ControlCommand : u32 {
ConvertSessionToDomain = 0,
ConvertDomainToSession = 1,
@@ -81,13 +80,13 @@ struct BufferDescriptorX {
u32_le address_bits_0_31;
u32_le Counter() const {
- u32_le counter{ counter_bits_0_5 };
+ u32_le counter{counter_bits_0_5};
counter |= counter_bits_9_11 << 9;
return counter;
}
VAddr Address() const {
- VAddr address{ address_bits_0_31 };
+ VAddr address{address_bits_0_31};
address |= static_cast<VAddr>(address_bits_32_35) << 32;
address |= static_cast<VAddr>(address_bits_36_38) << 36;
return address;
@@ -107,14 +106,14 @@ struct BufferDescriptorABW {
};
VAddr Address() const {
- VAddr address{ address_bits_0_31 };
+ VAddr address{address_bits_0_31};
address |= static_cast<VAddr>(address_bits_32_35) << 32;
address |= static_cast<VAddr>(address_bits_36_38) << 36;
return address;
}
u64 Size() const {
- u64 size{ size_bits_0_31 };
+ u64 size{size_bits_0_31};
size |= static_cast<u64>(size_bits_32_35) << 32;
return size;
}
@@ -130,7 +129,7 @@ struct BufferDescriptorC {
};
VAddr Address() const {
- VAddr address{ address_bits_0_31 };
+ VAddr address{address_bits_0_31};
address |= static_cast<VAddr>(address_bits_32_47) << 32;
return address;
}
@@ -144,6 +143,11 @@ struct DataPayloadHeader {
static_assert(sizeof(DataPayloadHeader) == 8, "DataPayloadRequest size is incorrect");
struct DomainMessageHeader {
+ enum class CommandType : u32_le {
+ SendMessage = 1,
+ CloseVirtualHandle = 2,
+ };
+
union {
// Used when responding to an IPC request, Server -> Client.
struct {
@@ -154,7 +158,7 @@ struct DomainMessageHeader {
// Used when performing an IPC request, Client -> Server.
struct {
union {
- BitField<0, 8, u32_le> command;
+ BitField<0, 8, CommandType> command;
BitField<16, 16, u32_le> size;
};
u32_le object_id;