aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle
AgeCommit message (Collapse)Author
2019-05-18core/kernel/object: Rename ResetType enum membersLioncash
Renames the members to more accurately indicate what they signify. "OneShot" and "Sticky" are kind of ambiguous identifiers for the reset types, and can be kind of misleading. Automatic and Manual communicate the kind of reset type in a clearer manner. Either the event is automatically reset, or it isn't and must be manually cleared. The "OneShot" and "Sticky" terminology is just a hold-over from Citra where the kernel had a third type of event reset type known as "Pulse". Given the Switch kernel only has two forms of event reset types, we don't need to keep the old terminology around anymore.
2019-05-18HLE/IPC: HLEContext can memorize the client thread and use it for ↵Weiyi Wang
SleepClientThread This reduces the boilerplate that services have to write out the current thread explicitly. Using current thread instead of client thread is also semantically incorrect, and will be a problem when we implement multicore (at which time there will be multiple current threads)
2019-05-09service/set: Correct and simplify behavior related to copying language codesLioncash
This corrects cases where it was possible to write more entries into the write buffer than were requested. Now, we check the size of the buffer before actually writing into them. We were also returning the wrong value for GetAvailableLanguageCodeCount2(). This was previously returning 64, but only 17 should have been returned. 64 entries is the size of the static array used in MakeLanguageCode() within the service binary itself, but isn't the actual total number of language codes present.
2019-05-09Merge pull request #2437 from lioncash/audctlbunnei
service/audctl: Update documentation comments to be relative to 8.0.0
2019-04-30service/audren_u: Handle variadic command buffers in GetWorkBufferSize()Lioncash
Also introduced in REV5 was a variable-size audio command buffer. This also affects how the size of the work buffer should be determined, so we can add handling for this as well. Thankfully, no other alterations were made to how the work buffer size is calculated in 7.0.0-8.0.0. There were indeed changes made to to how some of the actual audio commands are generated though (particularly in REV7), however they don't apply here.
2019-04-30service/audren_u: Handle version 2 of performance frame info in ↵Lioncash
GetWorkBufferSize() Introduced in REV5. This is trivial to add support for, now that everything isn't a mess of random magic constant values. All this is, is a change in data type sizes as far as this function cares.
2019-04-30service/audren_u: Clean up work buffer calculationsLioncash
"Unmagics" quite a few magic constants within this code, making it much easier to understand. Particularly given this factors out specific sections into their own self-contained lambda functions.
2019-04-29kernel/svc: Make svcCreateThread/svcStartThread/svcSleepThread/svcExitThread ↵Lioncash
calls show up in the debug log These are actually quite important indicators of thread lifetimes, so they should be going into the debug log, rather than being treated as misc info and delegated to the trace log.
2019-04-29kernel/svc: Reorganize svcSetThreadCoreMask()Lioncash
Makes the code much nicer to follow in terms of behavior and control flow. It also fixes a few bugs in the implementation. Notably, the thread's owner process shouldn't be accessed in order to retrieve the core mask or ideal core. This should be done through the current running process. The only reason this bug wasn't encountered yet is because we currently only support running one process, and thus every owner process will be the current process. We also weren't checking against the process' CPU core mask to see if an allowed core is specified or not. With this out of the way, it'll be less noisy to implement proper handling of the affinity flags internally within the kernel thread instances.
2019-04-29kernel/thread: Update thread processor ID flagsLioncash
Adds the missing flags to the enum and documents them.
2019-04-28Merge pull request #2412 from lioncash/systembunnei
kernel/vm_manager: Remove usages of global system accessors
2019-04-27service/audctl: Update documentation comments to be relative to 8.0.0Lioncash
The state of these service calls are still the same in version 8.0.0.
2019-04-25mii_manager: Fix incorrect loop condition in mii UUID generation codeZach Hilman
2019-04-25profile_select: Port Service::Account::UUID to Common::UUIDZach Hilman
2019-04-25mii: Implement Delete and Destroy fileZach Hilman
2019-04-25mii: Implement IsUpdated command (IPC 0)Zach Hilman
2019-04-25mii_manager: Cleanup and optimizationZach Hilman
2019-04-25mii: Implement IDatabaseService commands using MiiManagerZach Hilman
Since the MiiManager was designed around the IPC interface, this is quite easy. Only functions that were clearly defined were implemented.
2019-04-25mii: Add MiiManager class to manage Mii databaseZach Hilman
Provides serialization/deserialization to the database in system save files, accessors for database state and proper handling of both major Mii formats (MiiInfo and MiiStoreData)
2019-04-25common: Extract UUID to its own classZach Hilman
Since the Mii database uses UUIDs very similar to the Accounts database, it makes no sense to not share code between them.
2019-04-24Merge pull request #2416 from lioncash/waitbunnei
kernel/svc: Clean up wait synchronization related functionality
2019-04-24Merge pull request #2228 from DarkLordZach/applet-manager-p1bunnei
applets: Add AppletManager and implement PhotoViewer and Error applets
2019-04-22Merge pull request #2420 from lioncash/audctlbunnei
service/audctl: Implement GetTargetVolumeMin() and GetTargetVolumeMax()
2019-04-19Merge pull request #2415 from lioncash/constbunnei
kernel/wait_object: Make GetHighestPriorityReadyThread() a const member function
2019-04-19Merge pull request #2421 from lioncash/svc-callbunnei
kernel/svc: Name supervisor call 0x36
2019-04-19Merge pull request #2374 from lioncash/pagetablebunnei
core: Reorganize boot order
2019-04-19kernel/svc: Name supervisor call 0x36Lioncash
This call was added to the SVC handlers in the 8.0.0 kernel, so we can finally give it a name.
2019-04-18service/audctl: Implement GetTargetVolumeMin() and GetTargetVolumeMax()Lioncash
These two service functions are literally hardcoded to always return these values without any other error checking.
2019-04-17Merge pull request #2397 from lioncash/thread-unusedbunnei
kernel/thread: Remove unused guest_handle member variable
2019-04-17web_browser: Make OpenPage non-constZach Hilman
2019-04-17main: Add GMainWindow hooks for Error displayZach Hilman
2019-04-17general_backend: Move StubApplet and add backend PhotoViewerZach Hilman
2019-04-17applets: Add Error appletZach Hilman
Responsible for displaying error codes and messages
2019-04-17applets: Port current applets to take frontend in constructorZach Hilman
As opposed to using Core::System::GetInstance()
2019-04-17am: Delegate applet creation to AppletManagerZach Hilman
2019-04-17applets: Add AppletManager class to control lifetimeZach Hilman
2019-04-17kernel/thread: Unify wait synchronization typesLioncash
This is a holdover from Citra, where the 3DS has both WaitSynchronization1 and WaitSynchronizationN. The switch only has one form of wait synchronizing (literally WaitSynchonization). This allows us to throw out code that doesn't apply at all to the Switch kernel. Because of this unnecessary dichotomy within the wait synchronization utilities, we were also neglecting to properly handle waiting on multiple objects. While we're at it, we can also scrub out any lingering references to WaitSynchronization1/WaitSynchronizationN in comments, and change them to WaitSynchronization (or remove them if the mention no longer applies).
2019-04-17kernel/svc: Migrate svcCancelSynchronization behavior to a thread functionLioncash
The actual behavior of this function is slightly more complex than what we're currently doing within the supervisor call. To avoid dumping most of this behavior in the supervisor call itself, we can migrate this to another function.
2019-04-17kernel/wait_object: Make GetHighestPriorityReadyThread() a const member functionLioncash
This doesn't actually modify internal state of a wait object, so it can be const qualified.
2019-04-16kernel/vm_manager: Remove usages of global system accessorsLioncash
Makes the dependency on the system instance explicit within VMManager's interface.
2019-04-15Merge pull request #2382 from lioncash/tablebunnei
service: Update service function tables
2019-04-15Merge pull request #2393 from lioncash/svcbunnei
kernel/svc: Implement svcMapProcessCodeMemory/svcUnmapProcessCodeMemory
2019-04-15svc: Specify handle value in thread's nameLioncash
Allows the handle to be seen alongside the entry point.
2019-04-15kernel/thread: Remove BoostPriority()Lioncash
This is a holdover from Citra that currently remains unused, so it can be removed from the Thread interface.
2019-04-14kernel/thread: Remove unused guest_handle member variableLioncash
This member variable is entirely unused. It was only set but never actually utilized. Given that, we can remove it to get rid of noise in the thread interface.
2019-04-13Merge pull request #2378 from lioncash/robunnei
ldr: Minor amendments to IPC-related parameters
2019-04-13Merge pull request #2357 from zarroboogs/force-30fps-modebunnei
Add a toggle to force 30FPS mode
2019-04-13Merge pull request #2381 from lioncash/fsbunnei
fsp_srv: Minor cleanup related changes
2019-04-12kernel/svc: Implement svcUnmapProcessCodeMemoryLioncash
Essentially performs the inverse of svcMapProcessCodeMemory. This unmaps the aliasing region first, then restores the general traits of the aliased memory. What this entails, is: - Restoring Read/Write permissions to the VMA. - Restoring its memory state to reflect it as a general heap memory region. - Clearing the memory attributes on the region.
2019-04-12kernel/svc: Implement svcMapProcessCodeMemoryLioncash
This is utilized for mapping code modules into memory. Notably, the ldr service would call this in order to map objects into memory.