diff options
Diffstat (limited to 'src/core/hle/service/service.h')
| -rw-r--r-- | src/core/hle/service/service.h | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h index dd268f39c..931512339 100644 --- a/src/core/hle/service/service.h +++ b/src/core/hle/service/service.h | |||
| @@ -50,23 +50,23 @@ enum DescriptorType : u32 { | |||
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | /** | 52 | /** |
| 53 | * @brief Creates a command header to be used for IPC | 53 | * @brief Creates a command header to be used for IPC |
| 54 | * @param command_id ID of the command to create a header for. | 54 | * @param command_id ID of the command to create a header for. |
| 55 | * @param normal_params Size of the normal parameters in words. Up to 63. | 55 | * @param normal_params Size of the normal parameters in words. Up to 63. |
| 56 | * @param translate_params_size Size of the translate parameters in words. Up to 63. | 56 | * @param translate_params_size Size of the translate parameters in words. Up to 63. |
| 57 | * @return The created IPC header. | 57 | * @return The created IPC header. |
| 58 | * | 58 | * |
| 59 | * Normal parameters are sent directly to the process while the translate parameters might go | 59 | * Normal parameters are sent directly to the process while the translate parameters might go |
| 60 | * through modifications and checks by the kernel. | 60 | * through modifications and checks by the kernel. |
| 61 | * The translate parameters are described by headers generated with the IPC::*Desc functions. | 61 | * The translate parameters are described by headers generated with the IPC::*Desc functions. |
| 62 | * | 62 | * |
| 63 | * @note While #normal_params is equivalent to the number of normal parameters, | 63 | * @note While #normal_params is equivalent to the number of normal parameters, |
| 64 | * #translate_params_size includes the size occupied by the translate parameters headers. | 64 | * #translate_params_size includes the size occupied by the translate parameters headers. |
| 65 | */ | 65 | */ |
| 66 | constexpr u32 MakeHeader(u16 command_id, unsigned int normal_params, | 66 | constexpr u32 MakeHeader(u16 command_id, unsigned int normal_params, |
| 67 | unsigned int translate_params_size) { | 67 | unsigned int translate_params_size) { |
| 68 | return (u32(command_id) << 16) | ((u32(normal_params) & 0x3F) << 6) | | 68 | return (u32(command_id) << 16) | ((u32(normal_params) & 0x3F) << 6) | |
| 69 | (u32(translate_params_size) & 0x3F); | 69 | (u32(translate_params_size) & 0x3F); |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | union Header { | 72 | union Header { |
| @@ -77,7 +77,7 @@ union Header { | |||
| 77 | }; | 77 | }; |
| 78 | 78 | ||
| 79 | inline Header ParseHeader(u32 header) { | 79 | inline Header ParseHeader(u32 header) { |
| 80 | return{ header }; | 80 | return {header}; |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | constexpr u32 MoveHandleDesc(u32 num_handles = 1) { | 83 | constexpr u32 MoveHandleDesc(u32 num_handles = 1) { |
| @@ -111,19 +111,19 @@ union StaticBufferDescInfo { | |||
| 111 | }; | 111 | }; |
| 112 | 112 | ||
| 113 | inline StaticBufferDescInfo ParseStaticBufferDesc(const u32 desc) { | 113 | inline StaticBufferDescInfo ParseStaticBufferDesc(const u32 desc) { |
| 114 | return{ desc }; | 114 | return {desc}; |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | /** | 117 | /** |
| 118 | * @brief Creates a header describing a buffer to be sent over PXI. | 118 | * @brief Creates a header describing a buffer to be sent over PXI. |
| 119 | * @param size Size of the buffer. Max 0x00FFFFFF. | 119 | * @param size Size of the buffer. Max 0x00FFFFFF. |
| 120 | * @param buffer_id The Id of the buffer. Max 0xF. | 120 | * @param buffer_id The Id of the buffer. Max 0xF. |
| 121 | * @param is_read_only true if the buffer is read-only. If false, the buffer is considered to have | 121 | * @param is_read_only true if the buffer is read-only. If false, the buffer is considered to have |
| 122 | * read-write access. | 122 | * read-write access. |
| 123 | * @return The created PXI buffer header. | 123 | * @return The created PXI buffer header. |
| 124 | * | 124 | * |
| 125 | * The next value is a phys-address of a table located in the BASE memregion. | 125 | * The next value is a phys-address of a table located in the BASE memregion. |
| 126 | */ | 126 | */ |
| 127 | inline u32 PXIBufferDesc(u32 size, unsigned buffer_id, bool is_read_only) { | 127 | inline u32 PXIBufferDesc(u32 size, unsigned buffer_id, bool is_read_only) { |
| 128 | u32 type = PXIBuffer; | 128 | u32 type = PXIBuffer; |
| 129 | if (is_read_only) | 129 | if (is_read_only) |