summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hle_ipc.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-01-25service: add template serializer for method callsLiam1-0/+2
2024-01-19SMMU: Initial adaptation to video_core.Fernando Sahmkow1-6/+3
2024-01-19NVDRV: Implement sessions and initial implementation of SMMUFernando Sahmkow1-0/+8
2024-01-08Fix typos in src/core (#12625)Viktor Szépe1-9/+9
* Fix typos in src/core * Fix typo correction * Fix indentation of MemoryStateNames * Fix indent
2023-12-25am/jit: reference memory instance from contextLiam1-0/+4
2023-12-25service: fetch objects from the client handle tableLiam1-5/+11
2023-12-09service: populate pid and handle table from clientLiam1-5/+9
2023-12-09service: use interface factory in server managerLiam1-0/+1
2023-10-17service: hle: Allow to access read buffer A and X directlygerman771-0/+6
2023-03-01service: move hle_ipc from kernelLiam1-45/+32
2023-02-21sm:: fix lingering session initialization issuesLiam1-0/+12
2023-02-21sm:: support service registration deferralLiam1-0/+9
2023-02-21service: refactor server architectureLiam1-25/+9
Converts services to have their own processes
2023-02-03Revert "Merge pull request #9718 from yuzu-emu/revert-9508-hle-ipc-buffer-span"ameerj1-2/+6
This reverts commit 25fc5c0e1158cb8e81cbc769b24ad84032a1fbfd, reversing changes made to af20e25081f97d55b451606c87922e2b49f0d363.
2023-02-02Revert "hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer"liamwhite1-6/+2
2022-12-29hle_ipc: Rename ReadBufferSpan to ReadBufferameerj1-3/+3
2022-12-29hle_ipc: Rename ReadBuffer to ReadBufferCopyameerj1-2/+3
Indicates explicitly that a copy is occurring
2022-12-25hle_ipc: Add ReadBufferSpan functionameerj1-0/+3
Returns a std::span to the buffer address, rather than create a copy of the memory into a std::vector
2022-11-23hle_ipc: Add helper functions for getting number of buffer elementsLioncash1-0/+12
2022-11-23hle_ipc: Mark relevant member functions as [[nodiscard]]Lioncash1-25/+25
Will allow the compiler to complain about cases where ignoring the return value would be a bug.
2022-11-07service_thread: fix deletionLiam1-3/+3
2022-10-31kernel: invert session request handling flowLiam1-17/+12
2022-10-26concepts: Use the std::contiguous_iterator conceptMorph1-1/+1
This also covers std::span, which does not have a const iterator. Also renames IsSTLContainer to IsContiguousContainer to explicitly convey its semantics.
2022-10-19kernel: remove most SessionRequestManager handling from KServerSessionLiam1-0/+9
2022-10-13kernel: remove KWritableEventLiam1-1/+1
2022-07-22Project AndioKelebek11-0/+8
2022-06-27core: Replace all instances of ResultCode with Resultgerman771-7/+6
2022-06-14common: Change semantics of UNREACHABLE to unconditionally crashLiam1-1/+1
2022-04-23general: Convert source file copyright comments over to SPDXMorph1-3/+2
This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-04-02hle: service: Add option for service interfaces to create or use the default thread.bunnei1-1/+7
2022-03-15core: hle: kernel: Use weak_ptr where possible for SessionRequestHandler and SessionRequestManager.bunnei1-4/+5
2022-01-21hle: kernel: KServerSession: Simplify CompleteSyncRequest EndWait.bunnei1-5/+0
- Considering is_thread_waiting is never set, so we can remove IsThreadWaiting. - KThread::EndWait will take the scheduler lock, so we can remove the redundant lock.
2021-10-07kernel: hle_ipc: Foward declare KAutoObjectMorph1-1/+1
2021-06-08hle: kernel: hle_ipc: Ensure SessionRequestHandler is valid.bunnei1-1/+2
2021-06-08hle: kernel: Remove service thread manager and use weak_ptr.bunnei1-3/+3
- We no longer need to queue up service threads to be destroyed. - Fixes a race condition where a thread could be destroyed too early, which caused a crash in Pokemon Sword/Shield.
2021-06-07hle: kernel: k_server_session: Return service thread by strong pointer.bunnei1-3/+3
2021-06-05hle: kernel: Refactor to allocate a ServiceThread per service handler.bunnei1-2/+20
- Previously, we would allocate a thread per session, which adds new threads on CloneCurrentObject. - This results in race conditions with N sessions queuing requests to the same service interface. - Fixes Pokken Tournament DX crashes/softlocks, which were regressed by #6347.
2021-05-21hle: kernel: hle_ipc: Simplify incoming/outgoing move/copy/domain objects.bunnei1-32/+11
2021-05-21hle: kernel: Implement CloneCurrentObject and improve session management.bunnei1-9/+73
2021-05-16hle_ipc: Add a getter for PIDMorph1-1/+6
2021-05-11hle: kernel: hle_ipc: Fix outgoing IPC response size calculation.bunnei1-0/+1
2021-05-11hle: kernel: hle_ipc: Improve IPC code and add initial support for TIPC.bunnei1-1/+2
- Fixes our move handles implementation to actually move objects. - Simplifies the traditional IPC path.
2021-05-11hle: kernel: Further cleanup and add TIPC helpers.bunnei1-3/+11
2021-05-11hle: ipc_helpers: Update IPC response generation for TIPC.bunnei1-2/+8
2021-05-08kernel: Eliminate variable shadowingLioncash1-1/+1
Now that the large kernel refactor is merged, we can eliminate the remaining variable shadowing cases.
2021-05-06hle: kernel: Migrate to KHandleTable.bunnei1-3/+4
2021-05-06hle: kernel: Rename Process to KProcess.bunnei1-1/+1
2021-05-06hle: kernel: Remove deprecated Object class.bunnei1-10/+0
2021-05-06hle: kernel: Migrate KPort, KClientPort, and KServerPort to KAutoObject.bunnei1-8/+2
2021-05-06hle: kernel: HandleTable: Remove deprecated APIs.bunnei1-5/+5
2021-05-06hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject.bunnei1-10/+8
2021-05-06hle: kernel: Refactor IPC interfaces to not use std::shared_ptr.bunnei1-8/+11
2021-05-06hle: kernel: Migrate more of KThread to KAutoObject.bunnei1-2/+2
2021-05-06hle: kernel: Refactor out various KThread std::shared_ptr usage.bunnei1-7/+3
2021-04-15hle_ipc: Add helper functions to get copy/move handlesMorph1-0/+10
2021-02-05hle: kernel: Rename WritableEvent to KWritableEvent.bunnei1-1/+1
2021-02-05hle: kernel: Rename ReadableEvent to KReadableEvent.bunnei1-1/+1
2021-01-29hle: kernel: Recode implementation of KThread to be more accurate.bunnei1-3/+0
2021-01-29core: hle: kernel: Rename Thread to KThread.bunnei1-7/+7
2021-01-28hle_ipc: Add Can(Read, Write)BufferMorph1-0/+6
Allows us to test whether a buffer can be read from or written to memory
2020-12-29hle: kernel: hle_ipc: Remove SleepClientThread.bunnei1-17/+0
- This was kind of hacky, and no longer is necessary with service threads.
2020-11-08ipc_helpers: Remove usage of the global system instanceLioncash1-0/+6
Resolves numerous deprecation warnings throughout the codebase due to inclusion of this header. Now building core should be significantly less noisy (and also relying on less global state). This also uncovered quite a few modules that were relying on indirect includes, which have also been fixed.
2020-08-03ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer (#4465)David1-14/+16
* ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer With the support of C++20, we can use concepts to deduce if a type is an STL container or not. * More agressive concept for stl containers * Add -fconcepts * Move to common namespace * Add Common::IsBaseOf
2020-05-03hle_ipc: Eliminate core memory globalsLioncash1-1/+10
We can just pass the required instances into the constructor of the request, eliminating all usages of the global system accessor.
2020-04-17hle_ipc: Remove std::size_t casts where applicableLioncash1-5/+7
These were added in the change that enabled -Wextra on linux builds so as not to introduce interface changes in the same change as a build-system flag addition. Now that the flags are enabled, we can freely change the interface to make these unnecessary.
2019-11-28kernel: Implement a more accurate IPC dispatch.bunnei1-0/+13
2019-11-25kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154)bunnei1-18/+20
* kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. - See https://github.com/citra-emu/citra/pull/4710 for details.
2019-05-18HLE/IPC: HLEContext can memorize the client thread and use it for SleepClientThreadWeiyi Wang1-4/+4
This reduces the boilerplate that services have to write out the current thread explicitly. Using current thread instead of client thread is also semantically incorrect, and will be a problem when we implement multicore (at which time there will be multiple current threads)
2019-03-08kernel/hle_ipc: Convert std::shared_ptr IPC header instances to std::optionalLioncash1-7/+8
There's no real need to use a shared lifetime here, since we don't actually expose them to anything else. This is also kind of an unnecessary use of the heap given the objects themselves are so small; small enough, in fact that changing over to optionals actually reduces the overall size of the HLERequestContext struct (818 bytes to 808 bytes).
2019-03-05core/hle/ipc: Remove unnecessary includesLioncash1-5/+5
Removes a few inclusion dependencies from the headers or replaces existing ones with ones that don't indirectly include the required headers. This allows removing an inclusion of core/memory.h, meaning that if the memory header is ever changed in the future, it won't result in rebuilding the entirety of the HLE services (as the IPC headers are used quite ubiquitously throughout the HLE service implementations).
2019-01-01core/kernel: Remove unnecessary inclusionsLioncash1-3/+6
Gets rid of a few unnecessary header dependencies in some source files.
2018-11-29hle_ipc: Refactor SleepClientThread to avoid ReadableEventZach Hilman1-3/+1
2018-11-29hle_ipc: Use event pair for SleepClientThreadZach Hilman1-5/+9
2018-10-30hle_ipc: Add member function for querying the existence of a domain headerLioncash1-0/+4
Gets rid of the need to call the getter and then check for null.
2018-10-30hle_ipc: Make GetDomainMessageHeader return a regular pointerLioncash1-2/+2
Nothing requires the shared owner ship here, so we can just return a plain pointer.
2018-10-20kernel/process: Make the handle table per-processLioncash1-6/+7
In the kernel, there isn't a singular handle table that everything gets tossed into or used, rather, each process gets its own handle table that it uses. This currently isn't an issue for us, since we only execute one process at the moment, but we may as well get this out of the way so it's not a headache later on.
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi1-10/+10
2018-08-09hle_ipc: Make WriteToOutgoingCommandBuffer()'s reference parameter constLioncash1-1/+1
This function doesn't modify anything within the reference Thread instance.
2018-08-02kernel: Move object class to its own source filesLioncash1-1/+1
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-07-31kernel: Remove unnecessary includesLioncash1-1/+0
Removes unnecessary direct dependencies in some headers and also gets rid of indirect dependencies that were being relied on to be included.
2018-07-24hle_ipc: Make constructors explicit where applicableLioncash1-1/+1
2018-07-19hle_ipc: Introduce generic WriteBuffer overload for multiple container typesLioncash1-2/+21
This introduces a slightly more generic variant of WriteBuffer(). Notably, this variant doesn't constrain the arguments to only accepting std::vector instances. It accepts whatever adheres to the ContiguousContainer concept in the C++ standard library. This essentially means, std::array, std::string, and std::vector can be used directly with this interface. The interface no longer forces you to solely use containers that dynamically allocate. To ensure our overloads play nice with one another, we only enable the container-based WriteBuffer if the argument is not a pointer, otherwise we fall back to the pointer-based one.
2018-07-19core/memory, core/hle/kernel: Use std::move where applicableLioncash1-2/+2
Avoids pointless copies
2018-07-17nvflinger: Fix for BufferQueue event handling.bunnei1-1/+3
2018-05-02ipc: Add support for PopIpcInterface() method.bunnei1-0/+12
- This can be used for domain objects as inputs to service functions.
2018-05-01GetSharedFontInOrderOfPriority (#381)David1-5/+5
* GetSharedFontInOrderOfPriority * Update pl_u.cpp * Ability to use ReadBuffer and WriteBuffer with different buffer indexes, fixed up GetSharedFontInOrderOfPriority * switched to NGLOG * Update pl_u.cpp * Update pl_u.cpp * language_code is actually language code and not index * u32->u64 * final cleanups
2018-03-19hle_ipc: Add SleepClientThread to block current thread within HLE routines.bunnei1-0/+20
2018-03-19hle_ipc: Use shared_ptr instead of unique_ptr to allow copies.bunnei1-5/+5
2018-03-19hle_ipc: Remove GetPointer(..) usage with WriteToOutgoingCommandBuffer.bunnei1-2/+2
2018-02-16Service/hid: stub some functionsmailwl1-0/+2
2018-02-14hle_ipc: Remove const from WriteBuffer size.bunnei1-1/+1
2018-02-14hle_ipc: Add GetReadBufferSize and check write buffer size.bunnei1-0/+3
2018-02-14hle_ipc: Add helper functions for reading and writing buffers.bunnei1-0/+12
2018-01-25ipc_helpers: Make interface domain agnostic and add header validation.bunnei1-1/+12
2018-01-25hle: Integrate Domain handling into ServerSession.bunnei1-14/+2
2018-01-18Stub PopLaunchParameter and implement Buffer C Descriptors reading on hle_ipc (#96)gdkchan1-0/+6
* Stub PopLaunchParameter and implement Buffer C Descriptors reading * Address PR feedback * Ensure we push a u64 not a size_t * Fix formatting
2018-01-17IPC: Push domain objects as move handles when not in a domain.Subv1-0/+8
2018-01-16clang-formatMerryMage1-2/+2
2018-01-13yuzu: Update license text to be consistent across project.bunnei1-1/+1
2018-01-12core: Fix recent GCC build breaks.bunnei1-2/+2
2018-01-11IPC: Corrected some definitions for the buffer C descriptor flags.Subv1-0/+4
2018-01-07IPC: Add functions to read the input move/copy objects from an IPC request.Subv1-0/+12
2018-01-07IPC Cleanup: Remove 3DS-specific code and translate copy, move and domain objects in IPC requests.Subv1-22/+17
Popping objects from the buffer is still not implemented.
2018-01-07IPC: Use the correct size when pushing raw data to the command buffer and fixed pushing domain objects.Subv1-2/+6
Domain object ids are always stored immediately after the raw data.
2017-12-29kernel: Fix implementation of ConvertSessionToDomain.bunnei1-5/+24
2017-11-01service: Return proper result code for IPC::CommandType::Close.bunnei1-1/+1
2017-10-19hle_ipc: Parse out buffer X/A/B/B descriptors from incoming command buffer.bunnei1-0/+8
2017-10-15hle: Implement ConvertSessionToDomain, various cleanups.bunnei1-1/+2
2017-10-15hle: Initial implementation of NX service framework and IPC.bunnei1-2/+23
2017-06-19Kernel/IPC: Make HLERequestContext usable from outside kernelYuri Kunde Schlesner1-3/+4
2017-06-12Kernel/IPC: Use boost::small_vector for HLE context objectsYuri Kunde Schlesner1-1/+3
2017-06-11Kernel: Allow clearing request_objects to re-use buffer spaceYuri Kunde Schlesner1-0/+7
Reduces the necessary allocation to max(in_handles, out_handles) rather than (in_handles + out_handles).
2017-06-11Kernel: Basic support for IPC translation for HLE servicesYuri Kunde Schlesner1-2/+35
2017-06-11Kernel: Add methods in HLERequestContext abstracting handle creationYuri Kunde Schlesner1-0/+3
2017-06-11ServiceFramework: Use separate copy of command bufferYuri Kunde Schlesner1-3/+6
Copy the IPC command buffer to/from the request context before/after the handler is invoked. This is part of a move away from using global data for handling IPC requests.
2017-06-08Service: Add new ServiceFramework framework for writing HLE servicesYuri Kunde Schlesner1-2/+34
The old "Interface" class had a few problems such as using free functions (Which didn't allow you to write the service handler as if it were a regular class.) which weren't very extensible. (Only received one parameter with a pointer to the Interface object.) The new ServiceFramework aims to solve these problems by working with member functions and passing a generic context struct as parameter. This struct can be extended in the future without having to update all existing service implementations.
2017-06-06Kernel: Remove some unnecessary namespace qualificationsYuri Kunde Schlesner1-4/+6
2017-06-06Kernel: Add a dedicated SetHleHandler method to ServerPort/ServerSessionYuri Kunde Schlesner1-1/+2
This allows attaching a HLE handle to a ServerPort at any point after it is created, allowing port/session creation to be generic between HLE and regular services.
2017-06-06HLE: Move SessionRequestHandler from Service:: to Kernel::Yuri Kunde Schlesner1-0/+52
Most of the code that works with this is or will be in the kernel, so it's a more appropriate place for it to be.