summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/svc_wrap.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* hle: kernel: Recode implementation of KThread to be more accurate.bunnei2021-01-291-3/+53
|
* core: hle: Integrate new KConditionVariable and KAddressArbiter implementations.bunnei2021-01-111-16/+22
|
* core: hle: kernel: Update KSynchronizationObject.bunnei2021-01-111-4/+5
|
* Revert "core: Fix clang build"bunnei2020-10-211-9/+8
|
* core: Fix clang buildLioncash2020-10-181-8/+9
| | | | | | | Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
* SVC: Implement 32-bits wrappers and update Dynarmic.Fernando Sahmkow2020-06-271-3/+102
|
* SVC: Add GetCurrentProcessorNumber32, CreateTransferMemory32, SetMemoryAttribute32Fernando Sahmkow2020-06-271-0/+16
|
* SVC: Add GetThreadPriority32 & SetThreadPriority32Fernando Sahmkow2020-06-271-0/+18
|
* core: hle: Implement separate A32/A64 SVC interfaces.bunnei2020-03-031-42/+116
|
* kernel/svc: Correct function signature of SignalProcessWideKeyLioncash2019-12-111-5/+5
| | | | | This function doesn't actually return a result code, so we can amend the signature of it to match.
* kernel/svc: Provide implementations for svcDumpInfo/svcDumpInfoNewLioncash2019-12-081-0/+11
| | | | | | | | | These are fairly trivial to implement, we can just do nothing. This also provides a spot for us to potentially dump out any relevant info in the future (e.g. for debugging purposes with homebrew, etc). While we're at it, we can also correct the names of both of these supervisor calls.
* Implement MapPhysicalMemory/UnmapPhysicalMemoryMichael Scire2019-07-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This implements svcMapPhysicalMemory/svcUnmapPhysicalMemory for Yuzu, which can be used to map memory at a desired address by games since 3.0.0. It also properly parses SystemResourceSize from NPDM, and makes information available via svcGetInfo. This is needed for games like Super Smash Bros. and Diablo 3 -- this PR's implementation does not run into the "ASCII reads" issue mentioned in the comments of #2626, which was caused by the following bugs in Yuzu's memory management that this PR also addresses: * Yuzu's memory coalescing does not properly merge blocks. This results in a polluted address space/svcQueryMemory results that would be impossible to replicate on hardware, which can lead to game code making the wrong assumptions about memory layout. * This implements better merging for AllocatedMemoryBlocks. * Yuzu's implementation of svcMirrorMemory unprotected the entire virtual memory range containing the range being mirrored. This could lead to games attempting to map data at that unprotected range/attempting to access that range after yuzu improperly unmapped it. * This PR fixes it by simply calling ReprotectRange instead of Reprotect.
* kernel/svc: Implement svcMapProcessCodeMemoryLioncash2019-04-131-0/+7
| | | | | This is utilized for mapping code modules into memory. Notably, the ldr service would call this in order to map objects into memory.
* kernel/svc: Deglobalize the supervisor call handlersLioncash2019-04-081-159/+193
| | | | | | | | | | | Adjusts the interface of the wrappers to take a system reference, which allows accessing a system instance without using the global accessors. This also allows getting rid of all global accessors within the supervisor call handling code. While this does make the wrappers themselves slightly more noisy, this will be further cleaned up in a follow-up. This eliminates the global system accessors in the current code while preserving the existing interface.
* kernel/svc: Implement svcGetProcessListLioncash2019-04-021-0/+8
| | | | | | This service function simply copies out a specified number of kernel process IDs, while simultaneously reporting the total number of processes.
* kernel/svc: Correct output parameter for svcGetProcessIdLioncash2018-12-191-1/+9
| | | | | svcGetProcessId's out parameter is a pointer to a 64-bit value, not a 32-bit one.
* Merge pull request #1899 from lioncash/statebunnei2018-12-141-17/+5
|\ | | | | vm_manager/svc: Modify MemoryState enum, and correct error handling for svcQueryMemory
| * svc: Enable svcQueryProcessMemoryLioncash2018-12-121-0/+5
| | | | | | | | | | svcQueryProcessMemory is trivial to implement, given all the behavior necessary for it is present, it just needs a handler for it.
| * svc: Handle memory writing explicitly within QueryProcessMemoryLioncash2018-12-121-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moves the memory writes directly into QueryProcessMemory instead of letting the wrapper function do it. It would be inaccurate to allow the handler to do it because there's cases where memory shouldn't even be written to. For example, if the given process handle is invalid. HOWEVER, if the memory writing is within the wrapper, then we have no control over if these memory writes occur, meaning in an error case, 68 bytes of memory randomly get trashed with zeroes, 64 of those being written to wherever the memory info address points to, and the remaining 4 being written wherever the page info address points to. One solution in this case would be to just conditionally check within the handler itself, but this is kind of smelly, given the handler shouldn't be performing conditional behavior itself, it's a behavior of the managed function. In other words, if you remove the handler from the equation entirely, does the function still retain its proper behavior? In this case, no. Now, we don't potentially trash memory from this function if an invalid query is performed.
| * vm_manager: Migrate memory querying to the VMManager interfaceLioncash2018-12-121-1/+1
| | | | | | | | | | Gets rid of the need to directly access the managed VMAs outside of the memory manager itself just for querying memory.
| * vm_manager: Migrate MemoryInfo and PageInfo to vm_manager.hLioncash2018-12-121-1/+1
| | | | | | | | | | | | | | | | | | Gets the two structures out of an unrelated header and places them with the rest of the memory management code. This also corrects the structures. PageInfo appears to only contain a 32-bit flags member, and the extra padding word in MemoryInfo isn't necessary.
* | svc_wrap: Correct register index for a wrapper specializationLioncash2018-12-121-1/+1
|/ | | | | | | This would result in svcSetMemoryAttribute getting the wrong value for its third parameter. This is currently fine, given the service function is stubbed, however this will be unstubbed in a future change, so this needs to change.
* kernel/svc: Implement svcCreateEvent()Lioncash2018-12-041-0/+13
| | | | | | | | | | | | | | | svcCreateEvent operates by creating both a readable and writable event and then attempts to add both to the current process' handle table. If adding either of the events to the handle table fails, then the relevant error from the handle table is returned. If adding the readable event after the writable event to the table fails, then the writable event is removed from the handle table and the relevant error from the handle table is returned. Note that since we do not currently test resource limits, we don't check the resource limit table yet.
* svc: Implement svcCreateResourceLimit()Lioncash2018-11-271-0/+8
| | | | | | | | | | | | | | | This function simply creates a ResourceLimit instance and attempts to create a handle for it within the current process' handle table. If the kernal fails to either create the ResourceLimit instance or create a handle for the ResourceLimit instance, it returns a failure code (OUT_OF_RESOURCE, and HANDLE_TABLE_FULL respectively). Finally, it exits by providing the output parameter with the handle value for the ResourceLimit instance and returning that it was successful. Note: We do not return OUT_OF_RESOURCE because, if yuzu runs out of available memory, then new will currently throw. We *could* allocate the kernel instance with std::nothrow, however this would be inconsistent with how all other kernel objects are currently allocated.
* Stubbed SetMemoryPermissionFrederic Laing2018-11-031-0/+5
|
* svc: Implement svcGetProcessInfoLioncash2018-10-131-0/+8
| | | | | | | A fairly basic service function, which only appears to currently support retrieving the process state. This also alters the ProcessStatus enum to contain all of the values that a kernel process seems to be able of reporting with regards to state.
* Changed all casts in svc_wrap.h to be static_cast insteadDavid Marcec2018-10-101-25/+28
|
* Fixed incorrect types for svcBreakDavid Marcec2018-10-101-0/+5
| | | | svcBreak reason should be a u32, not a u64.
* kernel/svc: Implement svcGetThreadContext()Lioncash2018-09-301-0/+5
| | | | | | | | | Now that we have all of the rearranging and proper structure sizes in place, it's fairly trivial to implement svcGetThreadContext(). In the 64-bit case we can more or less just write out the context as is, minus some minor value sanitizing. In the 32-bit case we'll need to clear out the registers that wouldn't normally be accessible from a 32-bit AArch32 exectuable (or process).
* svc_wrap: Convert the PARAM macro into a functionLioncash2018-09-181-37/+36
| | | | | | This can just be a regular function, getting rid of the need to also explicitly undef the define at the end of the file. Given FuncReturn() was already converted into a function, it's #undef can also be removed.
* svc: Correct parameter type for OutputDebugString()Lioncash2018-09-121-2/+2
| | | | This should be a u64 to represent size.
* Add additional missing format.Michael Scire2018-06-221-2/+6
|
* Kernel/Arbiters: Add stubs for 4.x SignalToAddress/WaitForAddres SVCs.Michael Scire2018-06-211-0/+10
|
* core: Implement multicore support.bunnei2018-05-111-12/+12
|
* svc: Stub out SetThreadActivity, GetThreadContext.bunnei2018-04-031-0/+5
|
* svc: Stub GetThreadCoreMask.bunnei2018-03-301-0/+15
|
* Add UnmapSharedMemoryN00byKing2018-02-251-0/+5
| | | | | | | | C++11 requires spaces on the Identifier Add inttypes include clang
* Added CreateSharedMemory & UNIMPLEMENTED() for non existent services. (#113)David2018-01-201-0/+9
| | | | | | | | | | | | * Added svcCreateSharedMemory * Services which are not implemented now throw UNIMPLEMENTED() * clang-format * changed perms to u32 * removed camelcase
* svc: Implement svcMapSharedMemory.bunnei2018-01-141-0/+5
|
* yuzu: Update license text to be consistent across project.bunnei2018-01-131-1/+1
|
* svc: Implement GetSystemTick.bunnei2018-01-121-0/+8
|
* svc: Stub ResetSignal and CreateTransferMemorySubv2018-01-111-0/+8
|
* svc: Stub SetMemoryAttributeSubv2018-01-111-0/+6
|
* SVC: Fixed WaitSynchronization with multiple handles when at least one of them is ready.Subv2018-01-091-2/+5
|
* kernel: Rename Semaphore to ConditionVariable.bunnei2018-01-091-1/+1
|
* svc: Implement svcSignalProcessWideKey.bunnei2018-01-071-2/+2
|
* svc: Implement svcWaitProcessWideKeyAtomic.bunnei2018-01-061-0/+5
|
* hle: Move SVC code to kernel namespace.bunnei2018-01-031-0/+155