aboutsummaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
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-20Allow picking a Compatibility Profile for OpenGL.Fernando Sahmkow
This option allows picking the compatibility profile since a lot of bugs are fixed in it. We devs will use this option to easierly debug current problems in our Core implementation.:wq
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-17general_frontend: Add frontend scaffold for PhotoViewer appletZach Hilman
2019-04-17frontend: Add frontend receiver for Error appletZach 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-17web_browser: Make OpenPage constZach Hilman
2019-04-17core: Remove specific applets in favor of AppletManagerZach Hilman
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-13Merge pull request #2017 from jroweboy/glwidgetbunnei
Frontend: Migrate to QOpenGLWindow and support shared contexts
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.
2019-04-11core/core: Move process execution start to System's Load()Lioncash
This gives us significantly more control over where in the initialization process we start execution of the main process. Previously we were running the main process before the CPU or GPU threads were initialized (not good). This amends execution to start after all of our threads are properly set up.
2019-04-11core/process: Remove unideal page table setting from LoadFromMetadata()Lioncash
Initially required due to the split codepath with how the initial main process instance was initialized. We used to initialize the process like: Init() { main_process = Process::Create(...); kernel.MakeCurrentProcess(main_process.get()); } Load() { const auto load_result = loader.Load(*kernel.GetCurrentProcess()); if (load_result != Loader::ResultStatus::Success) { // Handle error here. } ... } which presented a problem. Setting a created process as the main process would set the page table for that process as the main page table. This is fine... until we get to the part that the page table can have its size changed in the Load() function via NPDM metadata, which can dictate either a 32-bit, 36-bit, or 39-bit usable address space. Now that we have full control over the process' creation in load, we can simply set the initial process as the main process after all the loading is done, reflecting the potential page table changes without any special-casing behavior. We can also remove the cache flushing within LoadModule(), as execution wouldn't have even begun yet during all usages of this function, now that we have the initialization order cleaned up.
2019-04-11core/core: Move main process creation into Load()Lioncash
Now that we have dependencies on the initialization order, we can move the creation of the main process to a more sensible area: where we actually load in the executable data. This allows localizing the creation and loading of the process in one location, making the initialization of the process much nicer to trace.
2019-04-11video_core/gpu: Create threads separately from initializationLioncash
Like with CPU emulation, we generally don't want to fire off the threads immediately after the relevant classes are initialized, we want to do this after all necessary data is done loading first. This splits the thread creation into its own interface member function to allow controlling when these threads in particular get created.
2019-04-11core/cpu_core_manager: Create threads separately from initialization.Lioncash
Our initialization process is a little wonky than one would expect when it comes to code flow. We initialize the CPU last, as opposed to hardware, where the CPU obviously needs to be first, otherwise nothing else would work, and we have code that adds checks to get around this. For example, in the page table setting code, we check to see if the system is turned on before we even notify the CPU instances of a page table switch. This results in dead code (at the moment), because the only time a page table switch will occur is when the system is *not* running, preventing the emulated CPU instances from being notified of a page table switch in a convenient manner (technically the code path could be taken, but we don't emulate the process creation svc handlers yet). This moves the threads creation into its own member function of the core manager and restores a little order (and predictability) to our initialization process. Previously, in the multi-threaded cases, we'd kick off several threads before even the main kernel process was created and ready to execute (gross!). Now the initialization process is like so: Initialization: 1. Timers 2. CPU 3. Kernel 4. Filesystem stuff (kind of gross, but can be amended trivially) 5. Applet stuff (ditto in terms of being kind of gross) 6. Main process (will be moved into the loading step in a following change) 7. Telemetry (this should be initialized last in the future). 8. Services (4 and 5 should ideally be alongside this). 9. GDB (gross. Uses namespace scope state. Needs to be refactored into a class or booted altogether). 10. Renderer 11. GPU (will also have its threads created in a separate step in a following change). Which... isn't *ideal* per-se, however getting rid of the wonky intertwining of CPU state initialization out of this mix gets rid of most of the footguns when it comes to our initialization process.
2019-04-11Merge pull request #2360 from lioncash/svc-globalbunnei
kernel/svc: Deglobalize the supervisor call handlers
2019-04-11Merge pull request #2388 from lioncash/constexprbunnei
kernel: Make handle type declarations constexpr
2019-04-11kernel: Make handle type declarations constexprLioncash
Some objects declare their handle type as const, while others declare it as constexpr. This makes the const ones constexpr for consistency, and prevent unexpected compilation errors if these happen to be attempted to be used within a constexpr context.
2019-04-11service: Update service function tablesLioncash
Updates function tables based off information from SwitchBrew.
2019-04-10ldr: Mark IsValidNROHash() as a const member functionLioncash
This doesn't modify instance state, so it can be made const.
2019-04-10ldr: Amend parameters for LoadNro/UnloadNro LoadNrr/UnloadNrrLioncash
The initial two words indicate a process ID. Also UnloadNro only specifies one address, not two.
2019-04-10fsp_srv: Remove unnecessary parameter popping in IDirectory's Read()Lioncash
IDirectory's Read() function doesn't take any input parameters. It only uses the output parameters that we already provide.
2019-04-10fsp_srv: Log out option values in IFile's Read and Write functionsLioncash
These indicate options that alter how a read/write is performed. Currently we don't need to handle these, as the only one that seems to be used is for writes, but all the custom options ever seem to do is immediate flushing, which we already do by default.
2019-04-09kernel/server_session: Remove obsolete TODOsLioncash
These are holdovers from Citra.
2019-04-09Merge pull request #1957 from DarkLordZach/title-providerbunnei
file_sys: Provide generic interface for accessing game data