| Age | Commit message (Collapse) | Author |
|
These can be made private, as they aren't accessed in contexts that
require them to be public.
|
|
Allows getting rid of reliance on the global accessor functions and
instead operating on the provided system instance.
|
|
- Invert conditions into guard clases where applicable.
- Mark std::vector parameter of WakeThreads as const
|
|
Places all of the functions for address arbiter operation into a class.
This will be necessary for future deglobalizing efforts related to both
the memory and system itself.
|
|
|
|
This is a TODO carried over from Citra that doesn't apply here.
|
|
Removes a few inclusion dependencies from the headers or replaces
existing ones with ones that don't indirectly include the required
headers.
This allows removing an inclusion of core/memory.h, meaning that if the
memory header is ever changed in the future, it won't result in
rebuilding the entirety of the HLE services (as the IPC headers are used
quite ubiquitously throughout the HLE service implementations).
|
|
Used as root for one region of cheats, set by loader
|
|
Significantly tidies up two guard conditionals.
|
|
Makes the interface uniform when it comes to checking various memory
regions.
|
|
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.
|
|
Create()
Given we already pass in a reference to the kernel that the shared
memory instance is created under, we can just use that to check the
current process, rather than using the global accessor functions.
This allows removing direct dependency on the system instance entirely.
|
|
Provides a bit of a more proper interface for these functions.
|
|
Makes immutable state explicit.
|
|
The kernel allows restricting the total size of the handle table through
the process capability descriptors. Until now, this functionality wasn't
hooked up. With this, the process handle tables become properly restricted.
In the case of metadata-less executables, the handle table will assume
the maximum size is requested, preserving the behavior that existed
before these changes.
|
|
Directly initializes members where applicable.
|
|
Avoids implicit truncation warnings from u32 -> u16 (the truncation is
desirable behavior here).
|
|
A fairly trivial change. Other sections of the codebase use nested
namespaces instead of separate namespaces here. This one must have just
been overlooked.
|
|
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.
|
|
Places all of the timing-related functionality under the existing Core
namespace to keep things consistent, rather than having the timing
utilities sitting in its own completely separate namespace.
|
|
A holdover from citra, the Horizon kernel on the switch has no
prominent kernel object that functions as a timer. At least not
to the degree of sophistication that this class provided.
As such, this can be removed entirely. This class also wasn't used at
all in any meaningful way within the core, so this was just code sitting
around doing nothing. This also allows removing a few things from the
main KernelCore class that allows it to use slightly less resources
overall (though very minor and not anything really noticeable).
|
|
thread list directly
No inheritors of the WaitObject class actually make use of their own
implementations of these functions, so they can be made non-virtual.
It's also kind of sketchy to allow overriding how the threads get added
to the list anyways, given the kernel itself on the actual hardware
doesn't seem to customize based off this.
|
|
This implementation just calls the base class variant of the function,
so this isn't necessary.
|
|
This just calls the base variant of the function, so it can be removed.
|
|
Looking into the implementation of the C++ standard facilities that seem
to be within all modules, it appears that they use 7 as a break reason
to indicate an uncaught C++ exception.
This was primarily found via the third last function called within
Horizon's equivalent of libcxxabi's demangling_terminate_handler(),
which passes the value 0x80000007 to svcBreak.
|
|
Pulse is considered a hack and nothing should be using it. We should completely remove it
|
|
Gets rid of a few unnecessary header dependencies in some source files.
|
|
This is a bounds check to ensure that the thread priority is within the
valid range of 0-64. If it exceeds 64, that doesn't necessarily mean
that an actual priority of 64 was expected (it actually means whoever
called the function screwed up their math).
Instead clarify the message to indicate the allowed range of thread
priorities.
|
|
Now that we handle the kernel capability descriptors we can correct
CreateThread to properly check against the core and priority masks
like the actual kernel does.
|
|
GetAllowedThreadPriorityMask()
Makes them consistent with their kernel capability counterparts.
|
|
Rather than use a switch here, this can be collapsed into a simple range
check, which is a little easier on the eyes.
|
|
kernel/process: Start the main thread using the specified ideal core
|
|
Print backtrace on svcBreak
|
|
This matches kernel behavior in that processes are started using their
specified ideal core, rather than always starting on core 0.
|
|
This makes the naming more closely match its meaning. It's just a
preferred core, not a required default core. This also makes the usages
of this term consistent across the thread and process implementations.
|
|
This function isn't a general purpose function that should be exposed to
everything, given it's specific to initializing the main thread for a
Process instance.
Given that, it's a tad bit more sensible to place this within
process.cpp, which keeps it visible only to the code that actually needs
it.
|
|
In all cases that these functions are needed, the VMManager can just be
retrieved and used instead of providing the same functions in Process'
interface.
This also makes it a little nicer dependency-wise, since it gets rid of
cases where the VMManager interface was being used, and then switched
over to using the interface for a Process instance. Instead, it makes
all accesses uniform and uses the VMManager instance for all necessary
tasks.
All the basic memory mapping functions did was forward to the Process'
VMManager instance anyways.
|
|
kernel: Handle kernel capability descriptors
|
|
Like the other members related to memory regions, the attributes need to
be reset back to their defaults as well.
|
|
svc: Implement SetThreadActivity (thread suspension)
|
|
Fixed uninitialized memory due to missing returns in canary
|
|
kernel/{process, thread}: Amend behavior related to IDs
|
|
While we're at it, we can also toss out the leftover capability parsing
from Citra.
|
|
|
|
This just specifies the handle table size. There's also a section of
reserved bits that are checked against.
|
|
|
|
|
|
Similar to the service capability flags, however, we currently don't
emulate the GIC, so this currently handles all interrupts as being valid
for the time being.
|
|
|
|
Handles the priority mask and core mask flags to allow building up the
masks to determine the usable thread priorities and cores for a kernel
process instance.
|