Commit graph

40 commits

Author SHA1 Message Date
Lioncash
38c2af9330 kernel: Move object class to its own source files
General moving to keep kernel object types separate from the direct
kernel code. Also essentially a preliminary cleanup before eliminating
global kernel state in the kernel code.
2018-08-01 23:34:42 -04:00
bunnei
a27c5d7afd Merge pull request #800 from lioncash/set
set_sys: Implement SetColorSetId()
2018-07-25 10:25:29 -07:00
Lioncash
506fb32dd5 ipc_helper: Add helper member function for popping enum values to RequestParser 2018-07-24 00:47:51 -04:00
Lioncash
a15433c2a9 hle_ipc: Make constructors explicit where applicable 2018-07-23 22:40:24 -04:00
Lioncash
1c25b997e8 ipc_helpers: Make member variables of ResponseBuilder private
These aren't used externally at all, so they can be made private.
2018-07-23 22:29:07 -04:00
Lioncash
9e7e0ed9f0 ipc_helpers: Add PushEnum() member function to ResponseBuilder
Allows pushing strongly-typed enum members without the need to always
cast them at the call sites.

Note that we *only* allow strongly-typed enums in this case. The reason
for this is that strongly typed enums have a guaranteed defined size, so
the size of the data being pushed is always deterministic. With regular
enums this can be a little more error-prone, so we disallow them.

This function simply uses the underlying type of the enum to determine
the size of the data. For example, if an enum is defined as:

enum class SomeEnum : u16 {
  SomeEntry
};

if PushEnum(SomeEnum::SomeEntry); is called, then it will push a
u16-size amount of data.
2018-07-20 15:00:58 -04:00
bunnei
5e4d01f80c ipc: Add support for PopIpcInterface() method.
- This can be used for domain objects as inputs to service functions.
2018-05-01 21:57:44 -04:00
mailwl
2ba8b89864 Fix: change check for domain order and existance of domain message header 2018-02-20 21:59:58 +03:00
mailwl
e05f10cae8 IPC: add domain header to response if only it exists in request 2018-02-20 19:27:49 +03:00
bunnei
ca93cbddcb ResponseBuilder: Use a bit field for customizing instead of always_move_handles. 2018-01-24 22:24:20 -05:00
bunnei
f328cb2c7c hle: Rename RequestBuilder to ResponseBuilder. 2018-01-24 22:24:10 -05:00
bunnei
2b07c87f0c ipc_helpers: Make interface domain agnostic and add header validation. 2018-01-24 22:19:01 -05:00
bunnei
a3aadaea60 hle: Integrate Domain handling into ServerSession. 2018-01-24 22:18:56 -05:00
bunnei
4fabdf77d7 hle: Remove Domain and SyncObject kernel objects. 2018-01-24 22:18:54 -05:00
Subv
196f1226c5 IPC: Don't create an unnecessary port when using PushIpcInterface outside of a domain. 2018-01-22 17:31:23 -05:00
bunnei
a94d5d1938 fsp_srv: Various improvements to IStorage:Read implementation. 2018-01-21 15:51:43 -05:00
gdkchan
90b697db30 Stub PopLaunchParameter and implement Buffer C Descriptors reading on hle_ipc (#96)
* Stub PopLaunchParameter and implement Buffer C Descriptors reading

* Address PR feedback

* Ensure we push a u64 not a size_t

* Fix formatting
2018-01-18 14:54:34 -05:00
Subv
911ea4451e IPC: Push domain objects as move handles when not in a domain. 2018-01-16 18:42:08 -05:00
Subv
da2990dbb7 IPC: Allow passing arguments to the Interfaces when using PushIpcInterface 2018-01-10 23:28:13 -05:00
Subv
f262afb38a IPC: Take the number of domain objects as a parameter in MakeBuilder. 2018-01-07 17:11:58 -05:00
Subv
7d966999d4 IPC: Fixed pushing ResultCodes into the command buffer.
They should have 32 bits of padding after the error code now.
2018-01-07 17:11:54 -05:00
Subv
347ab620b5 IPC: Add functions to read the input move/copy objects from an IPC request. 2018-01-07 17:11:51 -05:00
Subv
fd93b1e0ef IPC Cleanup: Remove 3DS-specific code and translate copy, move and domain objects in IPC requests.
Popping objects from the buffer is still not implemented.
2018-01-07 17:11:47 -05:00
Subv
d6a5e0b61b IPC: Use the correct size when pushing raw data to the command buffer and fixed pushing domain objects.
Domain object ids are always stored immediately after the raw data.
2018-01-07 17:11:43 -05:00
bunnei
9d04a45a90 kernel: Fix implementation of ConvertSessionToDomain. 2017-12-29 00:36:22 -05:00
bunnei
9ed2ef9c1c ipc_helpers: Fix alignment (was wrong as a result of a dynarmic bug). 2017-10-17 18:03:47 -04:00
bunnei
be299c7636 hle: Implement ConvertSessionToDomain, various cleanups. 2017-10-15 01:24:22 -04:00
bunnei
2ea8867549 hle: Initial implementation of NX service framework and IPC. 2017-10-14 22:18:42 -04:00
Huw Pascoe
da1c8d1522 Fixed type conversion ambiguity 2017-09-30 09:34:35 +01:00
Yuri Kunde Schlesner
192a95390e Kernel: Allow clearing request_objects to re-use buffer space
Reduces the necessary allocation to max(in_handles, out_handles) rather
than (in_handles + out_handles).
2017-06-11 13:10:21 -07:00
Yuri Kunde Schlesner
a74dbc2c24 IPC: Add Pop/PushObjects methods to RequestParser/Builder
These use the context functions to create and look-up handles for the
user.
2017-06-11 13:10:20 -07:00
Yuri Kunde Schlesner
2102e5e907 IPC: Add basic HLERequestContext support to RequestParser/Builder 2017-06-11 13:10:16 -07:00
Yuri Kunde Schlesner
ecfda5317e Kernel: Move HandleTable to a separate file 2017-05-29 17:34:39 -07:00
Lectem
268d389a37 IPCHelper Skip method + address comments for apt 2017-03-18 11:47:40 +01:00
Lectem
7b87571b09 fix #2560 and other comments 2017-03-18 10:44:01 +01:00
Lectem
48825ceb01 move push out of class body and add u8 u16 bool specializations 2017-03-18 10:44:01 +01:00
Lectem
f1e18b1880 refactor APT service to use the new IPC helpers 2017-03-18 10:44:01 +01:00
Lectem
fc81e9226a fix wwylele's comment and use typename in templates 2017-02-05 00:29:07 +01:00
Lectem
a7eeff24f0 move Pop methods out of class body 2016-12-26 14:42:06 +01:00
Lectem
09e966a107 IPC helpers 2016-12-26 14:07:29 +01:00