aboutsummaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
2019-04-05Merge pull request #2329 from lioncash/sanitizebunnei
kernel/svc: Properly sanitize mutex address in WaitProcessWideKeyAtomic
2019-04-05Merge pull request #2344 from lioncash/resultbunnei
hle/result: Remove unnecessary bitfield entry for ResultCode
2019-04-05hle/result: Remove unnecessary bitfield entry for ResultCodeLioncash
This is a hold over from the 3DS error codes in Citra.
2019-04-05Merge pull request #2338 from lioncash/fsbunnei
filesystem: Use a std::string_view in OpenFile()
2019-04-04Merge pull request #2292 from lioncash/nacpbunnei
file_sys/control_metadata: Amend naming of members
2019-04-04filesystem: Use a std::string_view in OpenFile()Lioncash
Rather than make a full copy of the path, we can just use a string view and truncate the viewed portion of the string instead of creating a totally new truncated string.
2019-04-04hle/service: Resolve unused variable warningsLioncash
In several places, we have request parsers where there's nothing to really parse, simply because the HLE function in question operates on buffers. In these cases we can just remove these instances altogether. In the other cases, we can retrieve the relevant members from the parser and at least log them out, giving them some use.
2019-04-03Merge pull request #2328 from lioncash/transferbunnei
service/am: Correct behavior of CreateTransferMemoryStorage()
2019-04-03Merge pull request #2093 from FreddyFunk/disk-cache-better-compressionbunnei
Better LZ4 compression utilization for the disk based shader cache and the yuzu build system
2019-04-03Merge pull request #2324 from lioncash/enum-unusedbunnei
kernel/object: Remove unused handle type entry
2019-04-03file_sys/control_metadata: Amend naming of membersLioncash
Quite a bit of these were out of sync with Switchbrew (and in some cases entirely wrong). While we're at it, also expand the section of named members. A segment within the control metadata is used to specify maximum values for the user, device, and cache storage max sizes and journal sizes. These appear to be generally used by the am service (e.g. in CreateCacheStorage, etc).
2019-04-03kernel/svc: Properly sanitize mutex address in WaitProcessWideKeyAtomicLioncash
We need to be checking whether or not the given address is within the kernel address space or if the given address isn't word-aligned and bail in these scenarios instead of trashing any kernel state.
2019-04-03service/am: Correct behavior of CreateTransferMemoryStorage()Lioncash
For whatever reason, shared memory was being used here instead of transfer memory, which (quite clearly) will not work based off the name of the function. This corrects this wonky usage of shared memory.
2019-04-03kernel/transfer_memory: Add accessors to data and sizesLioncash
Also amend erroneous use of size_t. We should be using u64 here.
2019-04-03Merge pull request #2294 from lioncash/fatalbunnei
service/am: Implement EnterFatalSection/LeaveFatalSection
2019-04-03Merge pull request #2305 from lioncash/sharedbunnei
kernel/shared_memory: Sanitize supplied size when unmapping
2019-04-03Merge pull request #2314 from lioncash/constbunnei
kernel/thread: Minor interface cleanup
2019-04-03kernel/object: Remove unused handle type entryLioncash
The AddressArbiter type isn't actually used, given the arbiter itself isn't a direct kernel object (or object that implements the wait object facilities). Given this, we can remove the enum entry entirely.
2019-04-02Merge pull request #2270 from lioncash/plistbunnei
kernel/svc: Implement svcGetProcessList and svcGetThreadList
2019-04-02Merge pull request #2313 from lioncash/reslimitbunnei
kernel/resource_limit: Remove the name member from resource limits
2019-04-02kernel/svc: Implement svcGetThreadListLioncash
Similarly like svcGetProcessList, this retrieves the list of threads from the current process. In the kernel itself, a process instance maintains a list of threads, which are used within this function. Threads are registered to a process' thread list at thread initialization, and unregistered from the list upon thread destruction (if said thread has a non-null owning process). We assert on the debug event case, as we currently don't implement kernel debug objects.
2019-04-02kernel/svc: Implement svcGetProcessListLioncash
This service function simply copies out a specified number of kernel process IDs, while simultaneously reporting the total number of processes.
2019-04-02process: Fix up compilationReinUsesLisp
2019-04-01Merge pull request #2281 from lioncash/memorybunnei
kernel/codeset: Make CodeSet's memory data member a regular std::vector
2019-04-01kernel/thread: Make AllWaitObjectsReady() a const qualified member functionLioncash
Now that ShouldWait() is a const qualified member function, this one can be made const qualified as well, since it can handle passing a const qualified this pointer to ShouldWait().
2019-04-01kernel/wait_object: Make ShouldWait() take thread members by pointer-to-constLioncash
Given this is intended as a querying function, it doesn't make sense to allow the implementer to modify the state of the given thread.
2019-04-01kernel/thread: Avoid sign conversion within GetCommandBufferAddress()Lioncash
Previously this was performing a u64 + int sign conversion. When dealing with addresses, we should generally be keeping the arithmetic in the same signedness type. This also gets rid of the static lifetime of the constant, as there's no need to make a trivial type like this potentially live for the entire duration of the program.
2019-04-01kernel/thread: Make parameter of GetWaitObjectIndex() const qualifiedLioncash
The pointed to member is never actually modified, so it can be made const.
2019-04-01kernel/resource_limit: Remove the name member from resource limitsLioncash
This doesn't really provide any benefit to the resource limit interface. There's no way for callers to any of the service functions for resource limits to provide a custom name, so all created instances of resource limits other than the system resource limit would have a name of "Unknown". The system resource limit itself is already trivially identifiable from its limit values, so there's no real need to take up space in the object to identify one object meaningfully out of N total objects.
2019-04-01Merge pull request #2301 from FearlessTobi/remove-amiibo-settingbunnei
core/yuzu: Remove enable_nfc setting
2019-04-01general: Use deducation guides for std::lock_guard and std::unique_lockLioncash
Since C++17, the introduction of deduction guides for locking facilities means that we no longer need to hardcode the mutex type into the locks themselves, making it easier to switch mutex types, should it ever be necessary in the future.
2019-03-30Merge pull request #2304 from lioncash/memsizebunnei
kernel/process: Report total physical memory used to svcGetInfo slightly better
2019-03-30Merge pull request #2308 from lioncash/deductionbunnei
kernel/scheduler: Minor tidying up
2019-03-30kernel/scheduler: Remove unused parameter to AddThread()Lioncash
This was made unused in b404fcdf1443b91ac9994c05ad1fe039fcd9675e, but the parameter itself wasn't removed.
2019-03-30kernel/scheduler: Use deduction guides on mutex locksLioncash
Since C++17, we no longer need to explicitly specify the type of the mutex within the lock_guard. The type system can now deduce these with deduction guides.
2019-03-30service/fatal: Mark local variables as const where applicableLioncash
2019-03-30service/fatal: Remove unnecessary semicolonLioncash
Resolves a -Wextra-semi warning.
2019-03-30service/fatal: Name FatalInfo structure membersLioncash
Based off RE, most of these structure members are register values, which makes, sense given this service is used to convey fatal errors. One member indicates the program entry point address, one is a set of bit flags used to determine which registers to print, and one member indicates the architecture type. The only member that still isn't determined is the final member within the data structure.
2019-03-29kernel/shared_memory: Remove unused core/memory.h includeLioncash
Nothing from this header is used, so we can remove this include, getting rid of a dependency on it.
2019-03-29kernel/shared_memory: Sanitize supplied size when unmappingLioncash
The kernel makes sure that the given size to unmap is always the same size as the entire region managed by the shared memory instance, otherwise it returns an error code signifying an invalid size. This is similarly done for transfer memory (which we already check for).
2019-03-29Addressed feedbackunknown
2019-03-29core: Do not link LZ4 to core. Use common/data_compression for nso segment ↵unknown
decompression instead.
2019-03-29core/yuzu: Remove enable_nfc settingfearlessTobi
This was initially added to prevent problems from stubbed/not implemented NFC services, but as we never encountered such and as it's only used in a deprecated function anyway, I guess we can just remove it to prevent more clutter of the settings.
2019-03-28kernel/process: Report total physical memory used to svcGetInfoLioncash
Reports the (mostly) correct size through svcGetInfo now for queries to total used physical memory. This still doesn't correctly handle memory allocated via svcMapPhysicalMemory, however, we don't currently handle that case anyways.
2019-03-28kernel/process: Store the total size of the code memory loadedLioncash
This will be necessary to properly report the used memory size in svcGetInfo.
2019-03-28Merge pull request #2266 from FernandoS27/arbitrationbunnei
Kernel: Fixes to Arbitration and SignalProcessWideKey Management
2019-03-28Merge pull request #2265 from FernandoS27/multilevelqueuebunnei
Replace old Thread Queue for a new Multi Level Queue
2019-03-28kernel/process: Store the main thread stack size to a data memberLioncash
This will be necessary in order to properly report memory usage within svcGetInfo.
2019-03-28kernel/process: Make Run's stack size parameter a u64Lioncash
This will make operating with the process-related SVC commands much nicer in the future (the parameter representing the stack size in svcStartProcess is a 64-bit value).
2019-03-28kernel/process: Ensure that given stack size is always page-alignedLioncash
The kernel always makes sure that the given stack size is aligned to page boundaries.