summaryrefslogtreecommitdiff
path: root/src/core (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | service/am: Unstub SetTransparentVolumeRate()Gravatar Lioncash2019-03-182-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like the other volume setter, this mainly just sets a data member within the service, nothing too special.
| * | | | | | | | service/am: Unstub SetExpectedMasterVolume()Gravatar Lioncash2019-03-182-11/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function passes in the desired main applet and library applet volume levels. We can then just pass those values back within the relevant volume getter functions, allowing us to unstub those as well. The initial values for the library and main applet volumes differ. The main applet volume is 0.25 by default, while the library applet volume is initialized to 1.0 by default in the services themselves.
* | | | | | | | | fsp_srv: Unstub SetCurrentProcessGravatar Lioncash2019-03-182-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This just acts as a basic setter for a given PID value and performs no further checking, so we can just store the passed in value.
* | | | | | | | | Merge pull request #2238 from lioncash/threadGravatar bunnei2019-03-172-21/+41
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | kernel/thread: Amend conditional test and assignment within UpdatePriority()
| * | | | | | | | kernel/thread: Expand documentation of nominal_priority and current_priorityGravatar Lioncash2019-03-152-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Aims to disambiguate why each priority instance exists a little bit. While we're at it, also add an explanatory comment to UpdatePriority().
| * | | | | | | | kernel/thread: Make bracing consistent within UpdatePriority()Gravatar Lioncash2019-03-151-2/+4
| | | | | | | | |
| * | | | | | | | kernel/thread: Amend condition within UpdatePriority()Gravatar Lioncash2019-03-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This condition was checking against the nominal thread priority, whereas the kernel itself checks against the current priority instead. We were also assigning the nominal priority, when we should be assigning current_priority, which takes priority inheritance into account. This can lead to the incorrect priority being assigned to a thread. Given we recursively update the relevant threads, we don't need to go through the whole mutex waiter list. This matches what the kernel does as well (only accessing the first entry within the waiting list).
| * | | | | | | | kernel/thread: Maintain priority ordering of added mutex waiting threadsGravatar Lioncash2019-03-151-14/+24
| | |_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel keeps the internal waiting list ordered by priority. This is trivial to do with std::find_if followed by an insertion.
* | | | | | | | Merge pull request #2252 from bunnei/move-page-tableGravatar bunnei2019-03-1711-219/+91
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | core: Move PageTable struct into Common.
| * | | | | | | | core: Move PageTable struct into Common.Gravatar bunnei2019-03-1611-219/+91
| | | | | | | | |
* | | | | | | | | Merge pull request #2249 from lioncash/ipcGravatar bunnei2019-03-161-0/+30
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | ipc_helpers: Allow pushing and popping floating-point values
| * | | | | | | | | ipc_helpers: Allow pushing and popping floating-point valuesGravatar Lioncash2019-03-161-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Certain values that are passed through the IPC buffer are actually floating point values, not solely integral values.
* | | | | | | | | | Merge pull request #2245 from lioncash/unused-defGravatar bunnei2019-03-161-6/+0
|\ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / |/| | | | | | | | | kernel/thread: Actually remove the definition of ExitCurrentThread()
| * | | | | | | | | kernel/thread: Actually remove the definition of ExitCurrentThread()Gravatar Lioncash2019-03-161-6/+0
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was intended to be removed in 51d7f6bffcc0498a47abc7de27bf0906fc523dae, but I guess I forgot to actually save the file like a dingus.
* | | | | | | | | Merge pull request #2243 from bunnei/mem-simplify-cacheGravatar bunnei2019-03-162-66/+21
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | memory: Simplify rasterizer cache operations.
| * | | | | | | | | memory: Simplify rasterizer cache operations.Gravatar bunnei2019-03-162-66/+21
| | | | | | | | | |
* | | | | | | | | | Merge pull request #2129 from FernandoS27/cntpctGravatar bunnei2019-03-163-2/+12
|\ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / |/| | | | | | | | | Correct CNTPCT from using CPU Cycles to using Clock Cycles
| * | | | | | | | | Corrections, documenting and fixes.Gravatar Fernando Sahmkow2019-02-162-4/+3
| | | | | | | | | |
| * | | | | | | | | Use u128 on Clock Cycles calculation.Gravatar Fernando Sahmkow2019-02-153-6/+6
| | | | | | | | | |
| * | | | | | | | | Correct CNTPCT to use Clock Cycles instead of Cpu Cycles.Gravatar Fernando Sahmkow2019-02-153-2/+13
| | | | | | | | | |
* | | | | | | | | | Merge pull request #2242 from lioncash/thread-fnGravatar bunnei2019-03-164-33/+31
|\ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / |/| | | | | | | | | kernel/thread: Remove WaitCurrentThread_Sleep() and ExitCurrentThread()
| * | | | | | | | | kernel/thread: Move thread exiting logic from ExitCurrentThread to svcExitThreadGravatar Lioncash2019-03-152-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Puts the operation on global state in the same places as the rest of the svc calls.
| * | | | | | | | | kernel/thread: Migrate WaitCurrentThread_Sleep into the Thread interfaceGravatar Lioncash2019-03-154-25/+24
| | |/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than make a global accessor for this sort of thing. We can make it a part of the thread interface itself. This allows getting rid of a hidden global accessor in the kernel code.
* | | | | | | | | gpu: Use host address for caching instead of guest address.Gravatar bunnei2019-03-142-6/+10
| |_|_|_|_|/ / / |/| | | | | | |
* | | | | | | | Merge pull request #2230 from lioncash/globalGravatar bunnei2019-03-142-8/+9
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | kernel/process: Remove use of global system accessors
| * | | | | | | | kernel/process: Remove use of global system accessorsGravatar Lioncash2019-03-122-8/+9
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we pass in a reference to the system instance, we can utilize it to eliminate the global accessors in Process-related code.
* | | | | | | | Merge pull request #2226 from lioncash/privateGravatar bunnei2019-03-134-14/+36
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | kernel/server_port: Make data members private
| * | | | | | | | kernel/server_port: Make data members privateGravatar Lioncash2019-03-114-14/+36
| | |_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this, all kernel objects finally have all of their data members behind an interface, making it nicer to reason about interactions with other code (as external code no longer has the freedom to totally alter internals and potentially messing up invariants).
* | | | | | | | Merge pull request #2223 from lioncash/errorGravatar bunnei2019-03-133-19/+5
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | core/hle/result: Tidy up the base error code result header.
| * | | | | | | | core/hle/result: Remove now-unnecessary manually defined copy assignment ↵Gravatar Lioncash2019-03-101-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | operator Previously this was required, as BitField wasn't trivially copyable. BitField has since been made trivially copyable, so now this isn't required anymore.
| * | | | | | | | core/hle/result: Amend error in comment description for ResultCodeGravatar Lioncash2019-03-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gets rid of another holdover from Citra, and describes the OS on the Switch instead.
| * | | | | | | | core/hle/result: Remove now-unused constructor for ResultCodeGravatar Lioncash2019-03-101-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the final stray ErrorDescription member was relocated, we can finally remove it and its relevant constructor in the ResultCode union.
| * | | | | | | | core/hle/result: Relocate IPC error code to ipc_helpersGravatar Lioncash2019-03-103-3/+4
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | | Merge pull request #2166 from lioncash/vi-init-serviceGravatar bunnei2019-03-139-40/+146
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | service/vi: Unstub GetDisplayService
| * | | | | | | service/vi: Unstub GetDisplayServiceGravatar Lioncash2019-02-265-11/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function is also supposed to check its given policy type with the permission of the service itself. This implements the necessary machinery to unstub these functions. Policy::User seems to just be basic access (which is probably why vi:u is restricted to that policy), while the other policy seems to be for extended abilities regarding which displays can be managed and queried, so this is assumed to be for a background compositor (which I've named, appropriately, Policy::Compositor).
| * | | | | | | core/ipc_helper: Allow popping all signed value types with RequestParserGravatar Lioncash2019-02-261-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no real reason this shouldn't be allowed, given some values sent via a request can be signed. This also makes it less annoying to work with popping enum values, given an enum class with no type specifier will work out of the box now. It's also kind of an oversight to allow popping s64 values, but nothing else.
| * | | | | | | service/vi: Remove use of a module classGravatar Lioncash2019-02-268-46/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This didn't really provide much benefit here, especially since the subsequent change requires that the behavior for each service's GetDisplayService differs in a minor detail. This also arguably makes the services nicer to read, since it gets rid of an indirection in the class hierarchy.
* | | | | | | | Merge pull request #2211 from lioncash/arbiterGravatar bunnei2019-03-128-64/+80
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | kernel: Make the address arbiter instance per-process
| * | | | | | | | kernel: Make the address arbiter instance per-processGravatar Lioncash2019-03-077-27/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have the address arbiter extracted to its own class, we can fix an innaccuracy with the kernel. Said inaccuracy being that there isn't only one address arbiter. Each process instance contains its own AddressArbiter instance in the actual kernel. This fixes that and gets rid of another long-standing issue that could arise when attempting to create more than one process.
| * | | | | | | | kernel/svc: Move address arbiter signaling behind a unified API functionGravatar Lioncash2019-03-073-22/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to how WaitForAddress was isolated to its own function, we can also move the necessary conditional checking into the address arbiter class itself, allowing us to hide the implementation details of it from public use.
| * | | | | | | | kernel/svc: Move address arbiter waiting behind a unified API functionGravatar Lioncash2019-03-073-19/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than let the service call itself work out which function is the proper one to call, we can make that a behavior of the arbiter itself, so we don't need to directly expose those implementation details.
* | | | | | | | | service/service: Remove unncessary calls to c_str()Gravatar Lioncash2019-03-101-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.
* | | | | | | | Merge pull request #2207 from lioncash/hwopusGravatar bunnei2019-03-101-69/+107
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | service/audio/hwopus: Move decoder state to its own class
| * | | | | | | | service/audio/hwopus: Move decoder state to its own classGravatar Lioncash2019-03-071-50/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moves the non-multistream specific state to its own class. This will be necessary to support the multistream variants of opus decoding.
| * | | | | | | | service/audio/hwopus: Provide a name for the second word of OpusPacketHeaderGravatar Lioncash2019-03-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This indicates the entropy coder's final range.
| * | | | | | | | service/audio/hwopus: Move Opus packet header out of the ↵Gravatar Lioncash2019-03-071-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IHardwareOpusDecoderManager This will be utilized by more than just that class in the future. This also renames it from OpusHeader to OpusPacketHeader to be more specific about what kind of header it is.
| * | | | | | | | service/audio/hwopus: Enclose internals in an anonymous namespaceGravatar Lioncash2019-03-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes it impossible to violate the ODR, as well as providing a place for future changes.
* | | | | | | | | Merge pull request #2193 from lioncash/globalGravatar bunnei2019-03-105-17/+23
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ / |/| | | | | | | | kernel/scheduler: Pass in system instance in constructor
| * | | | | | | | kernel/scheduler: Pass in system instance in constructorGravatar Lioncash2019-03-045-17/+23
| | |_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids directly relying on the global system instance and instead makes an arbitrary system instance an explicit dependency on construction. This also allows removing dependencies on some global accessor functions as well.
* | | | | | | | clang fixGravatar Hexagon122019-03-091-1/+2
| | | | | | | |