summaryrefslogtreecommitdiff
path: root/src/core (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | web_browser: Make OpenPage constGravatar Zach Hilman2019-04-172-3/+3
| | | | |
| * | | | core: Remove specific applets in favor of AppletManagerGravatar Zach Hilman2019-04-172-47/+32
| | | | |
| * | | | am: Delegate applet creation to AppletManagerGravatar Zach Hilman2019-04-171-24/+3
| | | | |
| * | | | applets: Add AppletManager class to control lifetimeGravatar Zach Hilman2019-04-172-0/+137
| | |/ / | |/| |
* | | | Merge pull request #2420 from lioncash/audctlGravatar bunnei2019-04-222-2/+32
|\ \ \ \ | |_|/ / |/| | | service/audctl: Implement GetTargetVolumeMin() and GetTargetVolumeMax()
| * | | service/audctl: Implement GetTargetVolumeMin() and GetTargetVolumeMax()Gravatar Lioncash2019-04-182-2/+32
| | | | | | | | | | | | | | | | | | | | These two service functions are literally hardcoded to always return these values without any other error checking.
* | | | Merge pull request #2415 from lioncash/constGravatar bunnei2019-04-192-2/+2
|\ \ \ \ | | | | | | | | | | kernel/wait_object: Make GetHighestPriorityReadyThread() a const member function
| * | | | kernel/wait_object: Make GetHighestPriorityReadyThread() a const member functionGravatar Lioncash2019-04-172-2/+2
| | |/ / | |/| | | | | | | | | | | | | | This doesn't actually modify internal state of a wait object, so it can be const qualified.
* | | | Merge pull request #2421 from lioncash/svc-callGravatar bunnei2019-04-191-1/+1
|\ \ \ \ | | | | | | | | | | kernel/svc: Name supervisor call 0x36
| * | | | kernel/svc: Name supervisor call 0x36Gravatar Lioncash2019-04-191-1/+1
| | |/ / | |/| | | | | | | | | | | | | | This call was added to the SVC handlers in the 8.0.0 kernel, so we can finally give it a name.
* | | | Merge pull request #2374 from lioncash/pagetableGravatar bunnei2019-04-1929-163/+206
|\ \ \ \ | |/ / / |/| | | core: Reorganize boot order
| * | | core/core: Move process execution start to System's Load()Gravatar Lioncash2019-04-1120-107/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | core/process: Remove unideal page table setting from LoadFromMetadata()Gravatar Lioncash2019-04-111-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | core/core: Move main process creation into Load()Gravatar Lioncash2019-04-111-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | video_core/gpu: Create threads separately from initializationGravatar Lioncash2019-04-111-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | core/cpu_core_manager: Create threads separately from initialization.Gravatar Lioncash2019-04-1111-39/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #2397 from lioncash/thread-unusedGravatar bunnei2019-04-173-18/+17
|\ \ \ \ | |_|/ / |/| | | kernel/thread: Remove unused guest_handle member variable
| * | | svc: Specify handle value in thread's nameGravatar Lioncash2019-04-152-2/+10
| | | | | | | | | | | | | | | | Allows the handle to be seen alongside the entry point.
| * | | kernel/thread: Remove unused guest_handle member variableGravatar Lioncash2019-04-143-16/+7
| | |/ | |/| | | | | | | | | | | | | 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.
* | | Merge pull request #2382 from lioncash/tableGravatar bunnei2019-04-1527-57/+262
|\ \ \ | | | | | | | | service: Update service function tables
| * | | service: Update service function tablesGravatar Lioncash2019-04-1127-57/+262
| | | | | | | | | | | | | | | | Updates function tables based off information from SwitchBrew.
* | | | Merge pull request #2393 from lioncash/svcGravatar bunnei2019-04-154-2/+274
|\ \ \ \ | | | | | | | | | | kernel/svc: Implement svcMapProcessCodeMemory/svcUnmapProcessCodeMemory
| * | | | kernel/svc: Implement svcUnmapProcessCodeMemoryGravatar Lioncash2019-04-123-1/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | kernel/svc: Implement svcMapProcessCodeMemoryGravatar Lioncash2019-04-124-1/+131
| | |_|/ | |/| | | | | | | | | | | | | | This is utilized for mapping code modules into memory. Notably, the ldr service would call this in order to map objects into memory.
* | | | kernel/thread: Remove BoostPriority()Gravatar Lioncash2019-04-152-11/+0
| |_|/ |/| | | | | | | | | | | This is a holdover from Citra that currently remains unused, so it can be removed from the Thread interface.
* | | Merge pull request #2378 from lioncash/roGravatar bunnei2019-04-131-65/+85
|\ \ \ | | | | | | | | ldr: Minor amendments to IPC-related parameters
| * | | ldr: Mark IsValidNROHash() as a const member functionGravatar Lioncash2019-04-101-5/+4
| | | | | | | | | | | | | | | | This doesn't modify instance state, so it can be made const.
| * | | ldr: Amend parameters for LoadNro/UnloadNro LoadNrr/UnloadNrrGravatar Lioncash2019-04-101-60/+81
| | |/ | |/| | | | | | | | | | The initial two words indicate a process ID. Also UnloadNro only specifies one address, not two.
* | | Merge pull request #2357 from zarroboogs/force-30fps-modeGravatar bunnei2019-04-132-6/+11
|\ \ \ | | | | | | | | Add a toggle to force 30FPS mode
| * | | added a toggle to force 30fps modeGravatar zarroboogs2019-04-092-6/+11
| | | |
* | | | Merge pull request #2381 from lioncash/fsGravatar bunnei2019-04-131-8/+7
|\ \ \ \ | | | | | | | | | | fsp_srv: Minor cleanup related changes
| * | | | fsp_srv: Remove unnecessary parameter popping in IDirectory's Read()Gravatar Lioncash2019-04-101-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | IDirectory's Read() function doesn't take any input parameters. It only uses the output parameters that we already provide.
| * | | | fsp_srv: Log out option values in IFile's Read and Write functionsGravatar Lioncash2019-04-101-4/+6
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #2017 from jroweboy/glwidgetGravatar bunnei2019-04-131-9/+30
|\ \ \ \ | |_|_|/ |/| | | Frontend: Migrate to QOpenGLWindow and support shared contexts
| * | | QT Frontend: Migrate to QOpenGLWindowGravatar James Rowe2019-01-211-9/+30
| | | |
* | | | Merge pull request #2360 from lioncash/svc-globalGravatar bunnei2019-04-118-364/+413
|\ \ \ \ | | | | | | | | | | kernel/svc: Deglobalize the supervisor call handlers
| * | | | kernel/svc: Deglobalize the supervisor call handlersGravatar Lioncash2019-04-078-364/+413
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjusts the interface of the wrappers to take a system reference, which allows accessing a system instance without using the global accessors. This also allows getting rid of all global accessors within the supervisor call handling code. While this does make the wrappers themselves slightly more noisy, this will be further cleaned up in a follow-up. This eliminates the global system accessors in the current code while preserving the existing interface.
* | | | Merge pull request #2388 from lioncash/constexprGravatar bunnei2019-04-1110-10/+10
|\ \ \ \ | | | | | | | | | | kernel: Make handle type declarations constexpr
| * | | | kernel: Make handle type declarations constexprGravatar Lioncash2019-04-1110-10/+10
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | 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.
* / | | kernel/server_session: Remove obsolete TODOsGravatar Lioncash2019-04-091-7/+2
|/ / / | | | | | | | | | These are holdovers from Citra.
* | | Merge pull request #1957 from DarkLordZach/title-providerGravatar bunnei2019-04-0915-187/+362
|\ \ \ | | | | | | | | file_sys: Provide generic interface for accessing game data
| * | | patch_manager: Dump NSO name with build IDGravatar Zach Hilman2019-03-274-9/+11
| | | |
| * | | game_list: Register content with ContentProviderGravatar Zach Hilman2019-03-261-2/+3
| | | |
| * | | core: Port current uses of RegisteredCache to ContentProviderGravatar Zach Hilman2019-03-268-27/+32
| | | |
| * | | core: Store system-wide ContentProvider for the emulatorGravatar Zach Hilman2019-03-262-0/+40
| | | |
| * | | file_sys: Create ContentProvider interface and default implementationsGravatar Zach Hilman2019-03-262-152/+279
| | | |
* | | | kernel/process: Set page table when page table resizes occur.Gravatar Lioncash2019-04-091-0/+2
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | We need to ensure dynarmic gets a valid pointer if the page table is resized (the relevant pointers would be invalidated in this scenario). In this scenario, the page table can be resized depending on what kind of address space is specified within the NPDM metadata (if it's present).
* | | Merge pull request #2361 from lioncash/pagetableGravatar bunnei2019-04-077-18/+3
|\ \ \ | | | | | | | | core/memory: Minor simplifications to page table management
| * | | core/memory: Remove GetCurrentPageTable()Gravatar Lioncash2019-04-072-6/+1
| | | | | | | | | | | | | | | | | | | | Now that nothing actually touches the internal page table aside from the memory subsystem itself, we can remove the accessor to it.
| * | | arm/arm_dynarmic: Remove unnecessary current_page_table memberGravatar Lioncash2019-04-072-8/+0
| | | | | | | | | | | | | | | | | | | | Given the page table will always be guaranteed to be that of whatever the current process is, we no longer need to keep this around.