| Age | Commit message (Collapse) | Author |
|
ldr_ro: Complete LDR:RO implementation
|
|
svc: ResetSignal is not stubbed
|
|
https://user-images.githubusercontent.com/20753089/48677874-b8e01c80-eb7b-11e8-8043-b99faa29022c.PNG
|
|
|
|
Similar to PR 1706, which cleans up the error codes for the filesystem
code, but done for the kernel error codes. This removes the ErrCodes
namespace and specifies the errors directly. This also fixes up any
straggling lines of code that weren't using the named error codes where
applicable.
|
|
Implement SetMemoryPermission
|
|
kernel/thread: Deduplicate scheduler switching code
|
|
Credits to Subv
|
|
svc: Use proper random entropy generation algorithm
|
|
The code in both places was the same verbatim, so we can extract it to a
function to deduplicate the logic.
|
|
Now that we've moved all of the heap-related stuff to the VMManager
class, we can unstub this function, as the necessary members are visible
now.
|
|
class and into the vm manager
Avoids a breach of responsibilities in the interface and keeps the
direct code for memory management within the VMManager class.
|
|
|
|
|
|
* svcBreak now dumps information from the debug buffer passed
info1 and info2 seem to somtimes hold an address to a buffer, this is usually 4 bytes or the size of the int and contains an error code. There's other circumstances where it can be something different so we hexdump these to examine them at a later date.
* Addressed comments
|
|
|
|
|
|
Cleans up unused includes and trims off some dependencies on externals.
|
|
* get rid of boost::optional
* Remove optional references
* Use std::reference_wrapper for optional references
* Fix clang format
* Fix clang format part 2
* Adressed feedback
* Fix clang format and MacOS build
|
|
hle_ipc: Make GetDomainMessageHeader return a regular pointer
|
|
Gets rid of the need to call the getter and then check for null.
|
|
Nothing requires the shared owner ship here, so we can just return a
plain pointer.
|
|
|
|
Nothing from this enum is intended to be used outside of this function.
|
|
This retrieves:
if (curr_thread == handle_thread) {
result = total_thread_ticks + (hardware_tick_count - last_context_switch_ticks);
} else if (curr_thread == handle_thread && sub_id == current_core_index) {
result = hardware_tick_count - last_context_switch_ticks;
}
|
|
|
|
to allocate a region of a given size.
|
|
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.
|
|
ERR_INVALID_COMBINATION
This is more consistent with what the kernel does.
|
|
|
|
This is what the kernel does in this instance.
|
|
These are now entirely unused and can be removed.
|
|
Like with the previous change, the kernel doesn't return NOT_AUTHORIZED
here. It returns INVALID_THREAD_PRIORITY.
|
|
priorities in SetThreadPriority()
All priority checks are supposed to occur before checking the validity
of the thread handle, we're also not supposed to return
ERR_NOT_AUTHORIZED here.
|
|
The kernel appears to return 0xE601 for this situation. Particularly in
svcWaitSynchronization, svcReplyAndReceive, and svcGetThreadContext
|
|
The kernel appears to return 0xF601 for this case.
|
|
Added break types to svcBreak
|
|
kernel/process: Make the handle table per-process
|
|
|
|
There seems to be more such as type 1, and 2. Unsure what these currently are but when a game hits them we can investigate and add the rest
|
|
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.
|
|
This should be comparing against the queried process' vma_map, not the
current process'. The only reason this hasn't become an issue yet is we
currently only handle one process being active at any time.
|
|
svc: Add missing sanitizing checks for MapSharedMemory/UnmapSharedMemory
|
|
svcArbitrateLock/svcArbitrateUnlock
The kernel itself checks whether or not the provided addresses are word
aligned before continuing, so we should be doing the same.
|
|
Aligning on 4KB pages isn't a Switch-specific thing, so this can be
moved to common so it can be used with other things as well.
|
|
Now that the changes clarifying the address spaces has been merged, we
can wrap the checks that the kernel performs when mapping shared memory
(and other forms of memory) into its own helper function and then use
those within MapSharedMemory and UnmapSharedMemory to complete the
sanitizing checks that are supposed to be done.
|
|
svc: Clarify enum values for AddressSpaceBaseAddr and AddressSpaceSize in svcGetInfo()
|
|
|
|
svcGetInfo()
So, one thing that's puzzled me is why the kernel seemed to *not* use
the direct code address ranges in some cases for some service functions.
For example, in svcMapMemory, the full address space width is compared
against for validity, but for svcMapSharedMemory, it compares against
0xFFE00000, 0xFF8000000, and 0x7FF8000000 as upper bounds, and uses
either 0x200000 or 0x8000000 as the lower-bounds as the beginning of the
compared range. Coincidentally, these exact same values are also used in
svcGetInfo, and also when initializing the user address space, so this
is actually retrieving the ASLR extents, not the extents of the address
space in general.
|
|
svc: Implement svcGetProcessInfo
|