| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Now that we've gotten the innaccurate error codes out of the way, we can
finally toss away a bunch of these, trimming down the error codes to
ones that are actually used and knocking out two TODO comments.
|
|
|
|
| |
This is what the kernel does in this instance.
|
|
|
|
| |
These are now entirely unused and can be removed.
|
|
|
|
|
| |
The kernel appears to return 0xE601 for this situation. Particularly in
svcWaitSynchronization, svcReplyAndReceive, and svcGetThreadContext
|
|
|
|
| |
The kernel appears to return 0xF601 for this case.
|
|
|
|
|
|
|
|
| |
This adds the missing address range checking that the service functions
do before attempting to map or unmap memory. Given that both service
functions perform the same set of checks in the same order, we can wrap
these into a function and just call it from both functions, which
deduplicates a little bit of code.
|
|
|
|
|
|
|
|
|
| |
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).
|
|\
| |
| | |
kernel/errors: Amend error code for ERR_NOT_FOUND
|
| |
| |
| |
| |
| | |
This is the value returned by the kernel for svcConnectToNamedPort() if
the named port cannot be found.
|
|/
|
|
|
| |
The kernel checks if the given size is a multiple of 2MB and <= to 4GB
before going ahead and attempting to allocate that much memory.
|
| |
|
|
|
|
|
|
| |
We can make this error code an alias of the resource limit exceeded
error code, allowing us to get rid of the lingering 3DS error code of
the same type.
|
|
|
|
|
| |
We can treat this as an alias of TooLarge for documentation purposes.
This also lets us get rid of another lingering 3DS-related error code.
|
|
|
|
|
| |
This replaces the lingering 3DS constant with the proper one, and
utilizes it within HandleTable's Create() member function.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Also added some proper error handling.
|
|
|
|
|
|
|
|
|
|
| |
Switch mutexes are no longer kernel objects, they are managed in userland and only use the kernel to handle the contention case.
Mutex addresses store a special flag value (0x40000000) to notify the guest code that there are still some threads waiting for the mutex to be released. This flag is updated when a thread calls ArbitrateUnlock.
TODO:
* Fix svcWaitProcessWideKey
* Fix svcSignalProcessWideKey
* Remove the Mutex class.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|