summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/service.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-03-07hle: rename legacy errors to ResultsLiam1-1/+1
2023-03-01nvnflinger: fix nameLiam1-5/+5
2023-03-01service: move hle_ipc from kernelLiam1-5/+5
2023-02-21service: refactor server architectureLiam1-90/+61
Converts services to have their own processes
2023-02-14service: remove deleted servicesLiam1-2/+0
2022-11-14Add break for default casesKyle Kienapfel1-0/+1
Visual Studio has an option to search all files in a solution, so I did a search in there for "default:" looking for any missing break statements. I've left out default statements that return something, and that throw something, even if via ThrowInvalidType. UNREACHABLE leads towards throw R_THROW macro leads towards a return
2022-10-31sm:: avoid excessive port recreationLiam1-4/+6
2022-10-31kernel: fix port trackingLiam1-1/+3
2022-10-31kernel: invert session request handling flowLiam1-5/+8
2022-10-23core: barrier service thread shutdownLiam1-0/+4
2022-07-31Properly write out the command buffer when serving close requestNikita Strygin1-2/+5
2022-06-29service: ptm: Rewrite PSM and add TSgerman771-2/+2
2022-06-27core: Replace all instances of ResultCode with Resultgerman771-2/+2
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-07service: jit: stub JIT serviceLiam1-0/+2
2022-04-02hle: service: Add option for service interfaces to create or use the default thread.bunnei1-2/+3
2022-03-25hle: vi: Integrate new NVFlinger and HosBinderDriverServer service.bunnei1-2/+4
2022-02-11service/mnpp: Stub mnpp_appNarr the Reg1-0/+2
Used in Super Nintendo Entertainment System™ - Nintendo Switch Online
2021-11-04core: Remove unused includesameerj1-4/+0
2021-08-27ngct: Stub NGCT:U servicegerman771-0/+2
2021-07-21hle: service: sm: Refactor to better manage ports.bunnei1-6/+5
2021-07-14service: Append service name prefix to common filenamesMorph1-3/+3
2021-06-23General: Resolve fmt specifiers to adhere to 8.0.0 API where applicableLioncash1-3/+3
Also removes some deprecated API usages.
2021-06-05hle: kernel: Refactor to allocate a ServiceThread per service handler.bunnei1-3/+3
- 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-06-02general: Replace RESULT_SUCCESS with ResultSuccessMorph1-3/+3
Transition to PascalCase for result names.
2021-05-21hle: kernel: Implement CloneCurrentObject and improve session management.bunnei1-2/+2
2021-05-11hle: service: Add support for dispatching TIPC requests.bunnei1-0/+29
2021-05-11hle: service: Implement IPC::CommandType::Close.bunnei1-8/+11
- This was not actually closing sessions before.
2021-05-11hle: service: sm: Use RegisterNamedService to register the service.bunnei1-1/+1
2021-05-11hle: kernel: Implement named service ports using service interface factory.bunnei1-2/+3
- This allows us to create a new interface each time ConnectToNamedPort is called, removing the assumption that these are static.
2021-05-06hle: kernel: Rename Process to KProcess.bunnei1-1/+1
2021-05-06hle: kernel: Migrate KPort, KClientPort, and KServerPort to KAutoObject.bunnei1-4/+5
2021-05-06hle: kernel: Migrate KServerPort to KAutoObject.bunnei1-2/+2
2021-05-06hle: kernel: Migrate KClientPort to KAutoObject.bunnei1-2/+2
2021-04-15common: Move settings to common from core.bunnei1-1/+1
- Removes a dependency on core and input_common from common.
2021-03-30configuration: Add auto stub toggle that resets on bootameerj1-4/+6
Auto-stub is an experimental debugging feature that may cause unforseen bugs. This adds a toggle to only allow auto-stubbing unimplemented functions when explicitly enabled when yuzu is launched.
2021-03-30service: Auto stub fallbackameerj1-0/+4
For simple services we can implement an automatic stub fallback to help with compatibility until a proper implementation is done. Co-Authored-By: Chloe <25727384+ognik5377@users.noreply.github.com>
2021-01-29core: hle: kernel: Rename Thread to KThread.bunnei1-1/+1
2020-12-29hle: service: Acquire and release a lock on requests.bunnei1-12/+10
- This makes it such that we can safely access service members from CoreTiming thread.
2020-12-29hle: service: Ensure system is powered on before writing IPC result.bunnei1-1/+5
2020-12-08core: Remove unnecessary enum casts in log callsLioncash1-1/+1
Follows the video core PR. fmt doesn't require casts for enum classes anymore, so we can remove quite a few casts.
2020-11-27service: Eliminate usages of the global system instanceLioncash1-34/+35
Completely removes all usages of the global system instance within the services code by passing in the using system instance to the services.
2020-11-24hle: services: Fix a crash with improper NVFlinger lifetime management. (#4977)bunnei1-11/+9
* hle: services: Fix a crash with improper NVFlinger lifetime management. - This crash would happen when attempting to shutdown yuzu early on in boot.
2020-11-19hle: service: Stub OLSC Initialize and SetSaveDataBackupSettingEnabled functions.bunnei1-0/+2
- Used by Animal Cross: New Horizons v1.6.0 update, minimal stub gets this update working.
2020-10-21Revert "core: Fix clang build"bunnei1-2/+2
2020-10-18core: Fix clang buildLioncash1-2/+2
Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
2020-09-25service: Restore "unused" functionLioncash1-0/+17
Turns out this function is actually used, but within a trace log.
2020-09-17service: Remove unused funcationLioncash1-22/+0
This is now completely unused, so it can be removed.
2020-09-07service: Remove two usages of the global system accessorLioncash1-4/+2
Removes more instances of reliance on global state.
2020-07-28services/bsd: Implement most of bsd:sReinUsesLisp1-1/+1
This implements: Socket, Poll, Accept, Bind, Connect, GetPeerName, GetSockName, Listen, Fcntl, SetSockOpt, Shutdown, Recv, RecvFrom, Send, SendTo, Write, and Close The implementation was done referencing: SwIPC, switchbrew, testing with libnx and inspecting its code, general information about bsd sockets online, and analysing official software. Not everything from these service calls is implemented, but everything that is not implemented will be logged in some way.
2019-11-28kernel: Implement a more accurate IPC dispatch.bunnei1-2/+2
2019-11-25kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154)bunnei1-1/+1
* 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-10-01bcat: Add FSC accessors for BCAT dataZach Hilman1-1/+1
Ports BCAT to use FSC interface
2019-09-22core: Add LM::Manager to systemZach Hilman1-1/+1
Allows centralized control over logging mechanisms.
2019-09-22Removed reference to core timing to nvflinger and used system insteadDavid Marcec1-1/+1
2019-09-22RebaseDavid Marcec1-13/+13
2019-09-22prepo: Remove system global accessorsZach Hilman1-1/+1
2019-09-22configure_debug: Move reporting option to loggingZach Hilman1-2/+2
2019-09-21yuzu: Port old usages of Filesystem namespace to FilesystemControllerZach Hilman1-1/+1
2019-09-21services: Pass FileSystemController as reference to services that need itZach Hilman1-2/+3
2019-07-19service/audio: Remove global system accessorsLioncash1-1/+1
Trims out the lingering reliance on global state out of the audio code.
2019-07-05nv_services: Deglobalize NvServicesFernando Sahmkow1-1/+1
2019-06-29am: Implement SetCpuBoostMode in terms of APMZach Hilman1-1/+1
2019-06-29fsp-srv: Implement OutputAccessLogToSdCardZach Hilman1-3/+2
Allows games to log data to the SD.
2019-06-27pm: Implement pm:shell and pm:dmnt GetApplicationPidZach Hilman1-1/+1
Returns the process ID of the current application or 0 if no app is running.
2019-06-25Implement Time::GetSharedMemoryNativeHandleDavid Marcec1-1/+1
This PR attempts to implement the shared memory provided by GetSharedMemoryNativeHandle. There is still more work to be done however that requires a rehaul of the current time module to handle clock contexts. This PR is mainly to get the basic functionality of the SharedMemory working and allow the use of addition to it whilst things get improved on. Things to note: Memory Barriers are used in the SharedMemory and a better solution would need to be done to implement this. Currently in this PR I’m faking the memory barriers as everything is sync and single threaded. They work by incrementing the counter and just populate the two data slots. On data reading, it will read the last added data. Specific values in the shared memory would need to be updated periodically. This isn't included in this PR since we don't actively do this yet. In a later PR when time is refactored this should be done. Finally, as we don't handle clock contexts. When time is refactored, we will need to update the shared memory for specific contexts. This PR does this already however since the contexts are all identical and not separated. We're just updating the same values for each context which in this case is empty. Tiime:SetStandardUserSystemClockAutomaticCorrectionEnabled, Time:IsStandardUserSystemClockAutomaticCorrectionEnabled are also partially implemented in this PR. The reason the implementation is partial is because once again, a lack of clock contexts. This will be improved on in a future PR. This PR closes issue #2556
2019-06-25applets: Pass current process title ID to appletsZach Hilman1-1/+1
Avoids using system accessor to get current process in applet code.
2019-06-25glue: Implement arp:w and arp:r servicesZach Hilman1-2/+2
These keep track of running process' launch properties and control properties and allows for issuing and reading them by process and title ID.
2019-06-17Addressed issuesDavid Marcec1-1/+1
2019-05-25service: Save report on unimplemented function callZach Hilman1-0/+3
2019-03-10core/hle/result: Relocate IPC error code to ipc_helpersLioncash1-2/+1
Relocates the error code to where it's most related, similar to how all the other error codes are. Previously we were including a non-generic error in the main result code header.
2019-03-10service/service: Remove unncessary calls to c_str()Lioncash1-4/+3
These can just be passed regularly, now that we use fmt instead of our old logging system. While we're at it, make the parameters to MakeFunctionString std::string_views.
2019-02-16core_timing: Convert core timing into a classLioncash1-2/+3
Gets rid of the largest set of mutable global state within the core. This also paves a way for eliminating usages of GetInstance() on the System class as a follow-up. Note that no behavioral changes have been made, and this simply extracts the functionality into a class. This also has the benefit of making dependencies on the core timing functionality explicit within the relevant interfaces.
2018-12-13Fix Service object leak on emulation stopJens Schmer1-5/+9
Services created with the ServiceFramework base class install themselves as HleHandlers with an owning shared_ptr in the ServerPort ServiceFrameworkBase::port member variable, creating a cyclic ownership between ServiceFrameworkBase and the ServerPort, preventing deletion of the service objects. Fix that by removing the ServiceFrameworkBase::port member because that was only used to detect multiple attempts at installing a port. Instead store a flag if the port was already installed to achieve the same functionality.
2018-12-06hle/service: Replace log + UNIMPLEMENTED with UNIMPLEMENTED_MSGLioncash1-2/+1
Combines the two into one, shortening the amount of code here.
2018-12-06hle/service: Remove unnecessary using declarationsLioncash1-5/+1
Only one usage of the specified objects made use of the lack of namespacing. Given the low usage, we can just remove these.
2018-12-06hle/service, hle/sm: Compress usages of MakeResult()Lioncash1-1/+1
These auto-deduce the result based off its arguments, so there's no need to do that work for the compiler, plus, the function return value itself already indicates what we're returning.
2018-12-06hle/service, hle/sm: Use structured bindings where applicableLioncash1-6/+2
Gets rid of the need to keep the variables separate from their actual initialization spots.
2018-11-14service: Mark MakeFunctionString with the [[maybe_unused]] attribute.Lioncash1-2/+2
When yuzu is compiled in release mode this function is unused, however, when compiled in debug mode, it's used within a LOG_TRACE statement. This prevents erroneous compilation warnings about an unused function (that isn't actually totally unused).
2018-10-21service: Add the basic skeleton for the NPNS servicesLioncash1-2/+4
2018-10-21service: Add skeleton for psm serviceZach Hilman1-0/+2
Seems to be the power controller. Listed in switchbrew under the category PTM services.
2018-10-13filesystem: Make CreateFactories() and InstallInterface() take a VfsFilesystem instance by referenceLioncash1-2/+2
Neither of these functions alter the ownership of the provided pointer, so we can simply make the parameters a reference rather than a direct shared pointer alias. This way we also disallow passing incorrect memory values like nullptr.
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi1-2/+2
2018-09-13service/vi: Replace includes with forward declarations where applicableLioncash1-1/+1
2018-09-10service: Remove unused g_kernel_named_ports variableLioncash1-2/+0
With the named port functionality all migrated over to the kernel, there's no need to keep this around anymore.
2018-09-02service: Migrate global named port map to the KernelCore classLioncash1-7/+2
Now that we have a class representing the kernel in some capacity, we now have a place to put the named port map, so we move it over and get rid of another piece of global state within the core.
2018-08-29kernel: Eliminate kernel global stateLioncash1-2/+7
As means to pave the way for getting rid of global state within core, This eliminates kernel global state by removing all globals. Instead this introduces a KernelCore class which acts as a kernel instance. This instance lives in the System class, which keeps its lifetime contained to the lifetime of the System class. This also forces the kernel types to actually interact with the main kernel instance itself instead of having transient kernel state placed all over several translation units, keeping everything together. It also has a nice consequence of making dependencies much more explicit. This also makes our initialization a tad bit more correct. Previously we were creating a kernel process before the actual kernel was initialized, which doesn't really make much sense. The KernelCore class itself follows the PImpl idiom, which allows keeping all the implementation details sealed away from everything else, which forces the use of the exposed API and allows us to avoid any unnecessary inclusions within the main kernel header.
2018-08-09core: Port core to VfsFilesystem for file accessZach Hilman1-2/+2
2018-08-08nvdrv: Get rid of global std::weak_ptrLioncash1-1/+1
Rather than use global state, we can simply pass the instance into the NVFlinger instance directly.
2018-08-07service: Add usb servicesLioncash1-0/+2
Adds basic skeleton for the usb services based off the information provided by Switch Brew.
2018-08-05service: Add arp servicesLioncash1-0/+2
Adds the basic skeleton of the arp services based off the information provided by Switch Brew.
2018-08-02service: Add migration servicesLioncash1-0/+2
Adds the basic skeleton for the mig:usr service based off information provided by Switch Brew.
2018-08-02service: Add psc servicesLioncash1-0/+2
Adds the basic skeleton for the psc services based off the information provided by Switch Brew.
2018-08-01service: Add capture servicesLioncash1-0/+2
Adds the basic skeleton for the capture services based off information provided by Switch Brew.
2018-08-01service: Add bpc and pcv servicesLioncash1-0/+4
Adds the basic skeleton for the remaining pcv-related services based off information on Switch Brew.
2018-07-31service: Add fgm servicesLioncash1-0/+2
Adds the basic skeleton for the fgm services based off the information provided by Switch Brew.
2018-07-31service: Add the pcie serviceLioncash1-0/+2
Adds the basic skeleton of the pcie service based off information on Switch Brew.
2018-07-29service: Add wlan servicesLioncash1-1/+3
Adds the basic skeleton for the wlan services based off the information on Switch Brew.
2018-07-29service: Add btm servicesLioncash1-0/+2
Adds the skeleton for the btm services based off the information on Switch Brew.
2018-07-27service: Add ncm servicesLioncash1-0/+2
Adds the basic skeleton for the ncm services based off information on Switch Brew.
2018-07-27service: Add mii servicesLioncash1-0/+2
Adds the skeleton for the mii services based off information provided by Switch Brew
2018-07-27service: Add nfc servicesLioncash1-0/+2
Adds the skeleton of the nfc service based off the information provided on Switch Brew.
2018-07-27service: Add the lbl serviceLioncash1-0/+2
Adds the skeleton of the lbl service based off the information provided by Switch Brew.
2018-07-27service: Add the btdrv serviceLioncash1-1/+3
Adds the skeleton for the btdrv service based off the information provided by Switch Brew
2018-07-26service: Add the grc:c serviceLioncash1-0/+2
Adds the basic skeleton for the grc:c service based off the information provided by Switch Brew.
2018-07-26service: Add the nim servicesLioncash1-0/+2
Adds the skeleton for the nim services based off information from Switch Brew.
2018-07-26service: Add ldn servicesLioncash1-0/+2
Adds ldn services based off information provided by Switch Brew.
2018-07-26service: Add ldr servicesLioncash1-0/+2
Adds the skeleton for the ldr-related services based off the information provided on Switch Brew.
2018-07-26service: Add eupld servicesLioncash1-0/+2
Adds the skeleton for the eupld services based off information on Switch Brew.
2018-07-26service: Add the erpt servicesLioncash1-0/+2
Adds the basic skeleton of the erpt service based off information on Switch Brew.
2018-07-25service: Add pm servicesLioncash1-0/+2
Adds the skeleton for the process management services based off information on Switch Brew.
2018-07-25service: Add the es serviceLioncash1-0/+2
Adds the skeleton for the ETicket service based off the information on Switch Brew
2018-07-03Rename logging macro back to LOG_*James Rowe1-4/+4
2018-06-05Service/MM: add service and stub some functionsmailwl1-0/+2
2018-05-28Service/BCAT: add module and servicesmailwl1-0/+2
2018-05-17Added RequestWithContext & ControlWithContextDavid Marcec1-0/+2
2018-05-02general: Make formatting of logged hex values more straightforwardLioncash1-4/+4
This makes the formatting expectations more obvious (e.g. any zero padding specified is padding that's entirely dedicated to the value being printed, not any pretty-printing that also gets tacked on).
2018-04-30string_util: Remove StringFromFormat() and related functionsLioncash1-3/+2
Given we utilize fmt, we don't need to provide our own functions for formatting anymore
2018-04-27general: Convert assertion macros over to be fmt-compatibleLioncash1-1/+1
2018-04-25Service/PCTL: convert to module, add services, stubmailwl1-1/+1
PCTL::CreateServiceWithoutInitialize and IParentalControlService::Initialize, required by Kirby Star Allies
2018-04-24service: Move logging macros over to new fmt-compatible onesLioncash1-5/+5
2018-04-23GetIUserInterface->CreateUserInterface, Added todos and stub logs. Playreport->PlayReport.David Marcec1-1/+1
2018-04-22Implemented GetIUserInterface properly, Playreport and SSL::SetInterfaceVersion. Fixed ipc issues with IAudioDevice(wrong ids)David Marcec1-0/+2
2018-04-21core: Relocate g_service_manager to the System classLioncash1-27/+25
Converts the service manager from a global into an instance-based variable.
2018-04-02externals: Update fmt to 4d35f94Daniel Lim Wee Soong1-6/+6
Versions prior to this didn't compile on OpenBSD due to unconditional use of the non-standard strtod_l() function. The fmt::MemoryWriter API has been removed in the intervening versions, so replace its use with fmt::memory_buffer and fmt::format_to. The library also no longer provides the fmt::fmt ALIAS, so define it in externals/CMakeLists.txt.
2018-03-30service: Add NFP module interface.bunnei1-0/+2
service: Initialize NFP service. Log: Add NFP service as a log subtype.
2018-03-23Service/SSL: add ssl servicemailwl1-0/+2
2018-03-22Service/spl: add module and servicesmailwl1-0/+2
2018-03-20Service: add fatal:u, fatal:p servicesmailwl1-0/+2
2018-03-19Clean Warnings (?)N00byKing1-1/+1
2018-03-19hle_ipc: Remove GetPointer(..) usage with WriteToOutgoingCommandBuffer.bunnei1-2/+1
2018-03-14core: Move process creation out of global state.bunnei1-2/+2
2018-03-03Service/Set: add more servicesmailwl1-1/+1
2018-02-19service: Add Friend service interface.bunnei1-0/+2
2018-02-15pl_u: Implement basic shared font loading from RAM dump.bunnei1-0/+2
2018-02-03Service:nifm: add nifm:a, nifm:s and nifm:u servicesmailwl1-0/+2
2018-01-25hle: Rename RequestBuilder to ResponseBuilder.bunnei1-1/+1
2018-01-25service: Fix all incorrect IPC response headers.bunnei1-1/+1
2018-01-22AppletOE: Make ISelfController keep a reference to nvflinger.Subv1-1/+1
It'll be needed when we implement CreateManagedDisplayLayer.
2018-01-22Services: Vi shouldn't be responsible for creating nvflinger.Subv1-1/+5
It is now created during Service initialization and passed to all the services that need it.
2018-01-21filesystem: Implement basic IStorage functionality.David Marcec1-0/+2
2018-01-19acc, set, applet_oe: stub various functions, add set service (#105)goaaats1-0/+2
* Stubs for various acc:u0 funcs needed * Stub for GetDesiredLanguage in IApplicationFunctions * Add set service + stubs needed for games * Fix formatting * Implement IProfile, IManagerForApplication, return bool in CheckAvailability, style fixes * Remove IProfile::Get(needs more research), fix IPC response sizes
2018-01-18Start to implement/stub BSD:U and SFDNSRES services (#78)flerovium^-^1-0/+2
* bsd: start stubbing bsd:u and sfdnsres * bsd: stubbed RegisterClient * bsd: attempt to get past socket() * bsd: fix some wrong assumptions about IPC * bsd: fix format specifiers * bsd: stubbed Connect() * bsd: stubbed SendTo() * made requested changes * sockets: respect alphabetical order at service installation * run clang-format * bsd: start stubbing bsd:u and sfdnsres * bsd: stubbed RegisterClient * bsd: attempt to get past socket() * bsd: fix some wrong assumptions about IPC * bsd: fix format specifiers * bsd: stubbed Connect() * bsd: stubbed SendTo() * made requested changes * sockets: respect alphabetical order at service installation * run clang-format * run clang-format (2)
2018-01-17acc_u0: Add IPC interface and stub InitializeApplicationInfo.bunnei1-0/+2
2018-01-17NV: Move the nvdrv classes into the Nvidia namespace, and move the functionality to a s single module that services call.Subv1-1/+1
2018-01-15time: Implement GetStandardUserSystemClock, GetCurrentTime.bunnei1-1/+4
2018-01-15audio: Stub out AudOutU::ListAudioOuts.bunnei1-0/+2
2018-01-15hid: Implement IAppletResource::GetSharedMemoryHandle.bunnei1-4/+1
2018-01-13yuzu: Update license text to be consistent across project.bunnei1-1/+1
2018-01-13Remove settings issues in sdl and fix a few files that broke in mingwJames Rowe1-2/+0
2018-01-11NV: Implemented (with stubs) the vi:m service and some of its subservices.Subv1-0/+4
The homebrew display test application now properly writes graphics data to the graphics buffer but we still don't have a way to compose the display layers.
2017-12-29kernel: Fix implementation of ConvertSessionToDomain.bunnei1-11/+2
2017-12-29service: Add empty interface for pctl:a.bunnei1-0/+2
2017-12-28service: Halt on ReportUnimplementedFunction and improve output log.bunnei1-4/+2
2017-12-28service: Add empty interface for aoc:u.bunnei1-0/+2
2017-11-01service: Return proper result code for IPC::CommandType::Close.bunnei1-2/+4
2017-10-19service: Add CreatePort function (that does not register/install).bunnei1-0/+10
2017-10-18service: Print correct command ID on unimplemented function.bunnei1-1/+1
2017-10-15hle: Implement ConvertSessionToDomain, various cleanups.bunnei1-12/+11
2017-10-15hle: Add service stubs for apm and appletOE.bunnei1-0/+4
2017-10-15hle: Initial implementation of NX service framework and IPC.bunnei1-72/+43
2017-10-13Remove more 3DS-specific code.bunnei1-2/+0
2017-10-13Remove more 3DS-specific code.bunnei1-9/+0
2017-10-10hle: Remove a large amount of 3ds-specific service code.bunnei1-70/+2
2017-09-16Services/NS: Port ns:s to the new service framework.Subv1-2/+3
2017-06-19ResultVal: Remove MoveFrom()Yuri Kunde Schlesner1-1/+1
Replace it with std::move(result_val).Unwrap(), or Foo().Unwrap() in case you already have an rvalue.
2017-06-19Kernel/IPC: Make HLERequestContext usable from outside kernelYuri Kunde Schlesner1-2/+1
2017-06-11Kernel: Basic support for IPC translation for HLE servicesYuri Kunde Schlesner1-12/+5
2017-06-11ServiceFramework: Use separate copy of command bufferYuri Kunde Schlesner1-6/+20
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-09Service/sm: Convert 'srv:' to ServiceFrameworkYuri Kunde Schlesner1-2/+3
2017-06-08Service: Remove a few redundant namespace qualifiersYuri Kunde Schlesner1-5/+5
2017-06-08Service: Add new ServiceFramework framework for writing HLE servicesYuri Kunde Schlesner1-1/+82
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-06Service: Remove unnecessary includes from service.hYuri Kunde Schlesner1-0/+1
This has a huge fallout in terms of needing to fix other files because all service implementations included that file.
2017-06-06Service: Make service registration part of the sm implementationYuri Kunde Schlesner1-8/+7
Also enhances the GetServiceHandle implementation to be more accurate.
2017-06-06Service: Move SRV interface to a new sm/ subdirectoryYuri Kunde Schlesner1-2/+2
This will contain the implementation of the sm (Service Manager) system module.
2017-06-06Kernel: Add a dedicated SetHleHandler method to ServerPort/ServerSessionYuri Kunde Schlesner1-8/+12
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-12/+1
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.
2016-12-30Service/NFC: stub GetTagInRangeEventmailwl1-0/+1
Fix Fatal Error in Mini-Mario & Friends - amiibo Challenge
2016-12-30Service/AC: add ac:i servicemailwl1-3/+3
2016-12-22Service/NWM: add nwm servicesmailwl1-3/+2
2016-12-14Fixed the codestyle to match our clang-format rules.Subv1-9/+12
2016-12-14Service/ACT: move ACT services to foldermailwl1-4/+2
2016-12-11Add all services to the Service namespaceLioncash1-17/+17
Previously there was a split where some of the services were in the Service namespace and others were not.
2016-12-09Moved the HLE command buffer translation task to ServerSession instead of the HLE handler superclass.Subv1-21/+1
2016-12-09Kernel/IPC: Small codestyle cleanupSubv1-1/+1
2016-12-08Added a framework for partially handling Session disconnections.Subv1-0/+10
Further implementation will happen in a future commit. Fixes a regression.
2016-12-08Use std::move where appropriate.Subv1-2/+5
2016-12-08service: Add mvd and qtm servicesLioncash1-0/+4
Adds the two New3DS-only modules. 3dbrew was used for command information.
2016-12-08service: Add nfc servicesLioncash1-30/+32
3dbrew was used for the command information.
2016-12-05Split SessionRequestHandler::HandleSyncRequest into HandleSyncRequest, TranslateRequest and HandleSyncRequestImpl.Subv1-4/+23
HandleSyncRequest now takes care of calling the command buffer translate function before actually invoking the command handler for HLE services.
2016-12-05KServerPorts now have an HLE handler "template", which is inherited by all ServerSessions created from it.Subv1-6/+8
2016-12-01A bit of a redesign.Subv1-6/+11
Sessions and Ports are now detached from each other. HLE services are handled by means of a SessionRequestHandler class, Interface now inherits from this class. The File and Directory classes are no longer kernel objects, but SessionRequestHandlers instead, bound to a ServerSession when requested. File::OpenLinkFile now creates a new session pair and binds the File instance to it.
2016-12-01IPC/HLE: Associate the ClientSessions with their parent port's HLE interface if it exists.Subv1-3/+5
Pass the triggering ServerSession to the HLE command handler to differentiate which session caused the request.
2016-12-01Kernel/HLE: Service::Interface no longer inherits from any Kernel object, and is now its own standalone class.Subv1-8/+4
Interface is now used by aggregation in ClientPort, to forward service commands to their HLE implementation if needed.
2016-12-01 Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication.Subv1-5/+11
All handles obtained via srv::GetServiceHandle or svcConnectToPort are references to ClientSessions. Service modules will wait on the counterpart of those ClientSessions (Called ServerSessions) using svcReplyAndReceive or svcWaitSynchronization[1|N], and will be awoken when a SyncRequest is performed. HLE Interfaces are now ClientPorts which override the HandleSyncRequest virtual member function to perform command handling immediately.
2016-09-21Use negative priorities to avoid special-casing the self-includeYuri Kunde Schlesner1-1/+1
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot1-17/+15
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot1-9/+14
2016-08-27LDR: Implement CROwwylele1-1/+1
2016-06-05service: Add other DLP servicesLioncash1-2/+3
Specifically, dlp::CLNT and dlp::FKCL Moves them to their own folder like with other services.
2016-05-18Update ACT:U and create ACT:A (#1809)András Domonkos1-0/+2
* Update ACT_U * Create act_a.h * Create act_a.cpp * Add service ACT:A * Add ACT:A source and header * Fix wrong header
2016-04-02Dummy implementation dlp:SRVR Service.exhalatio1-0/+2
2016-03-27frd:u: Initial stub some functionsmailwl1-2/+1
2016-03-14Reorganize the ndm service path for dummy implement functionJamePeng1-2/+3
SuspendDaemons , ResumeDaemons , OverrideDefaultDaemons The NDM file move to /core/hle/service/ndm/ now!
2015-07-19Change trace/unimplemented service call logs to use hexarchshift1-1/+1
Changes the log to use hex in the parameter list instead of decimal.
2015-06-12Services: Continue separation of services into their own folderspurpasmart961-32/+26
2015-05-29Remove every trailing whitespace from the project (but externals).Emmanuel Gil Peyrot1-1/+1
2015-05-07Common: Remove common.hYuri Kunde Schlesner1-1/+1
2015-04-14De-inline functions from Interface, removing them from service.hYuri Kunde Schlesner1-0/+43
This reduces the time for a full recompile from 65.43s to 59.53s (~9%)
2015-04-04IR: Move The IR services to their own folder and implement "GetHandles"purpasmart961-4/+3
2015-04-03Services: Stubs and minor changespurpasmart961-8/+10
2015-03-04Services: Moved the PTM and APT services to their own folderSubv1-28/+22
This coincidentally fixes an issue about the PTM service failing to create its SharedExtSaveData archive due to the FS service not being initialized by the time the creating code runs. Ideally I'd like to move each process to its own folder, and have a single file per process that registers the service classes, which would be in their own files inside that folder. Then each service class would just call functions from the process to complete the commands.
2015-02-16Services: Fixed "Tried to connect to named port err:f".Subv1-1/+1
err:f is a named port, not a service
2015-02-02Make Port/Service registration and querying more HW-accurateYuri Kunde Schlesner1-75/+55
2015-01-24Services: Stubbed more services.Subv1-1/+15
Implemented FSUser::CreateExtSaveData
2015-01-21Added HID_SPVR service and split HID_U implementation into service/hid/hid.xxxarchshift1-1/+3
2015-01-21Stubbed cam:u servicearchshift1-0/+2
2015-01-21Stubbed ptm:play servicearchshift1-0/+2
2015-01-13Services: Added some missing services.Subv1-0/+6
cfg:s, ptm:sysm, apt:s. apt:s is almost exactly the same as apt:u as per 3dbrew
2015-01-09Kernel: Start using boost::intrusive_ptr for lifetime managementYuri Kunde Schlesner1-1/+2
2015-01-07Fix double-free in Service manager during shutdownYuri Kunde Schlesner1-14/+0
Fixes #423.
2015-01-03Stub the y2r:u servicearchshift1-0/+2
2014-12-28Kernel: New handle managerYuri Kunde Schlesner1-1/+2
This handle manager more closely mirrors the behaviour of the CTR-OS one. In addition object ref-counts and support for DuplicateHandle have been added. Note that support for DuplicateHandle is still experimental, since parts of the kernel still use Handles internally, which will likely cause troubles if two different handles to the same object are used to e.g. wait on a synchronization primitive.
2014-12-28Rename ObjectPool to HandleTableYuri Kunde Schlesner1-2/+2
2014-12-26More services & small clean upspurpasmart961-2/+10
2014-12-21CFG: Create a new subfolder cfg inside service to handle cfgSubv1-2/+2
Moved most of the shared CFG code there, implemented a few CFG:I functions
2014-12-21License changepurpasmart961-1/+1
2014-12-16HLE: Rename namespaces to match move & fix initialization orderYuri Kunde Schlesner1-1/+1
2014-12-16HLE: Move kernel/archive.* to service/fs/Yuri Kunde Schlesner1-1/+1
2014-12-16Added stub for nim:aoc service...archshift1-0/+2
2014-12-16Added stub for cecd:u service...archshift1-0/+2
I couldn't find any information about this service...
2014-12-16Added stub for ldr:ro service...archshift1-0/+2
2014-12-16Added am:app service stub.archshift1-0/+2
Apparently nothing at all is known about this service...
2014-12-13Convert old logging calls to new logging macrosYuri Kunde Schlesner1-2/+2
2014-11-24HLE: Revamp error handling throrough the HLE codeYuri Kunde Schlesner1-1/+1
All service calls in the CTR OS return result codes indicating the success or failure of the call. Previous to this commit, Citra's HLE emulation of services and the kernel universally either ignored errors or returned dummy -1 error codes. This commit makes an initial effort to provide an infrastructure for error reporting and propagation which can be use going forward to make HLE calls accurately return errors as the original system. A few parts of the code have been updated to use the new system where applicable. One part of this effort is the definition of the `ResultCode` type, which provides facilities for constructing and parsing error codes in the structured format used by the CTR. The `ResultVal` type builds on `ResultCode` by providing a container for values returned by function that can report errors. It enforces that correct error checking will be done on function returns by preventing the use of the return value if the function returned an error code. Currently this change is mostly internal since errors are still suppressed on the ARM<->HLE border, as a temporary compatibility hack. As functionality is implemented and tested this hack can be eventually removed.
2014-11-21Add more services and some fixes, along with more "override"purpasmart961-0/+12
in the service's headers
2014-11-19Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generatedEmmanuel Gil Peyrot1-1/+1
2014-11-17Add missing boss:U service, needed according to Nintendo Zone logs.archshift1-0/+2
2014-11-11Add FRD:U service and functionsarchshift1-0/+2
2014-11-02Added stub err:f service.archshift1-0/+2
2014-11-01Added a bunch of servicespurpasmart961-0/+16
2014-10-29Renamed souce files of services to match port namesGareth Poole1-5/+5
2014-09-09core: Prune redundant includesarchshift1-5/+0
2014-09-06core: Pass string by reference in FetchFromPortName and DeleteServiceLioncash1-2/+2
2014-06-27FS: Added stubbed code to intercept and decode file system service functions.bunnei1-0/+2
FS: Added to CMakeLists.txt
2014-06-13HLE: Updated all uses of NULL to nullptr (to be C++11 compliant)bunnei1-2/+2
2014-05-30service: removed PT_A from, as this was just an alias for APT_Ubunnei1-2/+0
2014-05-30hle: cleaned up log messagesbunnei1-2/+6
2014-05-21- created a Kernel namespacebunnei1-2/+2
- cleaned up Kernel code a bit (moved stuff into namespace, fixed whitespace issues) - added handle types for all different CTROS handles
2014-05-19- updated service(s) to be KernelObject'sbunnei1-15/+7
- various cleanups
2014-05-19renamed "UID" to "Handle" where appropriatebunnei1-8/+8
2014-04-17added class stub for HID:User servicebunnei1-0/+2
2014-04-16- added stubbed out GSP::Gpu service interfacebunnei1-0/+4
- various cleanups/refactors to HLE services
2014-04-16fixed naming for APT_Ubunnei1-1/+1
2014-04-16- extracted srv: calls from service.cpp and put in its own modulebunnei1-80/+4
- added function tables for service calls - lots of refactoring
2014-04-14added a stub for GetLockHandlebunnei1-3/+7
2014-04-13added framework for APT service (application and title launching service)bunnei1-5/+24
2014-04-13renamed class Interface_SRV to SRVbunnei1-6/+6
2014-04-13added some very initial command parsing for SRV Syncbunnei1-5/+31
2014-04-13cleanups to service HLEbunnei1-6/+6
2014-04-13- added HLE to connect to "srv:" servicebunnei1-0/+115
- added a manager for keeping track of services/ports - added a memory mapped region for memory accessed by HLE - added HLE for GetThreadCommandBuffer function