summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/ldr (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-12-09ro: add separate ro serviceLiam1-634/+0
2023-11-10kernel: add KPageTableBaseLiam1-23/+22
Co-authored-by: Kelebek1 <eeeedddccc@hotmail.co.uk>
2023-08-08general: fix incorrect conversionsLiam1-1/+1
2023-08-08core: remove ResultVal typeLiam1-21/+25
2023-07-15kernel: reduce page table region checkingLiam1-3/+3
2023-07-15k_process: PageTable -> GetPageTableLiam1-7/+7
2023-03-24memory: rename global memory references to application memoryLiam1-5/+5
2023-03-22kernel: use KTypedAddress for addressesLiam1-2/+3
2023-03-01service: move hle_ipc from kernelLiam1-6/+6
2023-02-21service: refactor server architectureLiam2-13/+12
Converts services to have their own processes
2023-02-14general: rename CurrentProcess to ApplicationProcessLiam1-6/+7
2022-10-19core: hle: kernel: k_memory_block: Update.bunnei1-2/+2
2022-06-27core: Replace all instances of ResultCode with Resultgerman771-21/+20
2022-06-14common: Change semantics of UNREACHABLE to unconditionally crashLiam1-1/+1
2022-04-23general: Convert source file copyright comments over to SPDXMorph2-6/+4
This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-04-12core: hle: service: Allocate a service thread.bunnei1-1/+2
2022-04-09hle: kernel: Invalidate entire icache in UnmapProcessMemory and UnmapCodeMemory (fixes #8174)tech-ticks1-11/+19
2022-03-19core: Reduce unused includesameerj1-1/+0
2022-03-09hle: service: ldr: Use deterministic addresses when mapping NROs.bunnei1-19/+59
- Instead of randomization, choose in-order addresses for where to map NROs into memory. - This results in predictable behavior when debugging and consistent behavior when reproducing issues.
2022-01-12hle: kernel: k_page_table: Update SetProcessMemoryPermission.bunnei1-3/+4
2022-01-12hle: service: ldr: UnmapCodeMemory BSS only when set.bunnei1-3/+7
2022-01-12hle: kernel: k_page_table: ReadAndWrite -> UserReadWrite.bunnei1-1/+1
2022-01-12hle: kernel: k_page_table: Rename *ProcessCodeMemory -> *CodeMemory.bunnei1-14/+13
2021-11-21kernel: KPageTable: Rename SetCodeMemoryPermission to SetProcessMemoryPermissionMorph1-4/+4
2021-11-04general: Get the current process program id directly from the systemMorph1-2/+1
This allows us to avoid including KProcess' header file in files that only need to get the current process' program id.
2021-11-04general: Rename GetTitleID to GetProgramIDMorph1-1/+1
2021-11-02general: Remove MakeResult helpersMorph1-2/+2
This is made obsolete by the presence of implicit constructors.
2021-06-02general: Replace RESULT_SUCCESS with ResultSuccessMorph1-5/+5
Transition to PascalCase for result names.
2021-05-07ldr: Simplify memory copy within LoadNro()Lioncash1-5/+3
We can use the dedicated memory function for performing copies instead of reading into a temporary buffer and then immediately writing it back out to memory. Eliminates a bit of heap memory churn.
2021-05-06hle: kernel: Rename Process to KProcess.bunnei1-4/+4
2021-04-09ldr: Use proper namesgerman771-16/+16
2021-02-19hle: kernel: Migrate PageHeap/PageTable to KPageHeap/KPageTable.bunnei1-4/+3
2021-02-19hle: kernel: Migrate to KMemoryBlock, KMemoryBlockManager, and others.bunnei1-11/+10
2021-02-19hle: kernel: KSystemControl does not belong in Memory namespace.bunnei1-2/+2
2021-02-13kernel: Unify result codes (#5890)Chloe1-3/+3
* kernel: Unify result codes Drop the usage of ERR_NAME convention in kernel for ResultName. Removed seperation between svc_results.h & errors.h as we mainly include both most of the time anyways. * oops * rename errors to svc_results
2020-11-29core: arm: Implement InvalidateCacheRange for CPU cache invalidation.bunnei1-5/+0
2020-11-27service: Eliminate usages of the global system instanceLioncash2-8/+11
Completely removes all usages of the global system instance within the services code by passing in the using system instance to the services.
2020-11-08ipc_helpers: Remove usage of the global system instanceLioncash1-0/+1
Resolves numerous deprecation warnings throughout the codebase due to inclusion of this header. Now building core should be significantly less noisy (and also relying on less global state). This also uncovered quite a few modules that were relying on indirect includes, which have also been fixed.
2020-10-31hle: service: ldr: Implement UnloadNrr.bunnei1-1/+15
- Used by Final Fantasy X/X-2 HD Remaster.
2020-10-22core: Fix clang build pt.3Lioncash1-2/+2
Should finally resolve building with clang.
2020-10-21Revert "core: Fix clang build"bunnei1-2/+2
2020-10-18core: Fix clang buildLioncash1-2/+2
Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
2020-08-03service/ldr: Resolve sign mismatch warningsLioncash1-3/+2
We were performing an int < size_t comparison. We can just correct the type of the induction variable.
2020-06-28ldr: Cleanup NRO & NRR structsDavid Marcec1-8/+8
2020-06-18Move SHA256Hash to its original positionVolcaEM1-2/+2
It's not needed to have it in its previous position anymore
2020-06-16Remove unnecessary pragmasVolcaEM1-8/+0
2020-06-16Revert IsValidNRO refactor but make it more readableVolcaEM1-26/+13
2020-06-16Update assert stringVolcaEM1-1/+1
2020-06-14Clang-format againVolcaEM1-2/+2
2020-06-14Use consistent variable namesVolcaEM1-4/+4
2020-06-14Clang-formatVolcaEM1-1/+2
2020-06-14Make assert strings consistentVolcaEM1-3/+3
2020-06-14Attempt to fix crashes in SSBU and refactor IsValidNROVolcaEM1-36/+59
2020-06-02Address review commentsVolcaEM1-4/+4
2020-05-31Add comment to nrr_kindVolcaEM1-1/+1
According to Atmosphére (https://github.com/Atmosphere-NX/Atmosphere/blob/c7026b90940a1d88f9c10a6d98263bf22e654fa5/libraries/libstratosphere/include/stratosphere/ro/ro_types.hpp), nrr_kind (Atmosphére calls it "type") is 7.0.0+
2020-05-31ldr: Update NRR/NRO structs VolcaEM1-40/+72
This was based on Switchbrew pages: https://switchbrew.org/wiki/NRR https://switchbrew.org/wiki/NRO
2020-04-20service: Update function tablesLioncash1-0/+1
Keeps the service function tables up to date. Updated based off information on SwitchBrew.
2020-04-17core: hle: Address various feedback & code cleanup.bunnei1-8/+5
- Should be no functional changes.
2020-04-17service: ldr: Updates for new VMM.bunnei1-150/+215
- Includes removing some service impls. that are untested.
2020-03-26services: ldr: Fix MemoryState for read/write regions of NROs.bunnei1-5/+15
- Fixes #3541, used by Final Fantasy VIII Remastered.
2019-11-27core/memory: Migrate over Read{8, 16, 32, 64, Block} to the Memory classLioncash1-2/+3
With all of the trivial parts of the memory interface moved over, we can get right into moving over the bits that are used. Note that this does require the use of GetInstance from the global system instance to be used within hle_ipc.cpp and the gdbstub. This is fine for the time being, as they both already rely on the global system instance in other functions. These will be removed in a change directed at both of these respectively. For now, it's sufficient, as it still accomplishes the goal of de-globalizing the memory code.
2019-11-12core: Migrate off deprecated mbedtls functionsLioncash1-1/+1
These functions are marked for deprecation and it's recommended that the *_ret variants be used instead.
2019-10-06hle/service: Replace global system instance calls with instance-based onesLioncash1-3/+3
Migrates the HLE service code off the use of directly accessing the global system instance where trivially able to do so. This removes all usages of Core::CurrentProcess from the service code, only 8 occurrences of this function exist elsewhere. There's still quite a bit of "System::GetInstance()" being used, however this was able to replace a few instances.
2019-09-22Deglobalize System: LDRDavid Marcec2-6/+7
2019-07-11Restore memory perms on svcUnmapMemory/UnloadNroMichael Scire1-6/+26
Prior to PR, Yuzu did not restore memory to RW- on unmap of mirrored memory or unloading of NRO. (In fact, in the NRO case, the memory was unmapped instead of reprotected to --- on Load, so it was actually lost entirely...) This PR addresses that, and restores memory to RW- as it should. This fixes a crash in Super Smash Bros when creating a World of Light save for the first time, and possibly other games/circumstances.
2019-06-12common/hex_util: Combine HexVectorToString() and HexArrayToString()Lioncash1-1/+1
These can be generified together by using a concept type to designate them. This also has the benefit of not making copies of potentially very large arrays.
2019-04-11service: Update service function tablesLioncash1-0/+1
Updates function tables based off information from SwitchBrew.
2019-04-10ldr: Mark IsValidNROHash() as a const member functionLioncash1-5/+4
This doesn't modify instance state, so it can be made const.
2019-04-10ldr: Amend parameters for LoadNro/UnloadNro LoadNrr/UnloadNrrLioncash1-60/+81
The initial two words indicate a process ID. Also UnloadNro only specifies one address, not two.
2019-03-21kernel/vm_manager: Rename CodeStatic/CodeMutable to Code and CodeData respectivelyLioncash1-5/+3
Makes it more evident that one is for actual code and one is for actual data. Mutable and static are less than ideal terms here, because read-only data is technically not mutable, but we were mapping it with that label.
2018-12-28kernel/process: Remove most allocation functions from Process' interfaceLioncash1-11/+16
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.
2018-12-05service/ldr: Deduplicate instruction cache clearing code in LoadNro()Lioncash1-8/+2
We don't need to specify all of the ARM interfaces explicitly.
2018-12-05service/ldr: Amend layout of the NRO headerLioncash1-3/+3
The first word is just a padding byte, it's not an actual entry instruction. Also renames the rest of the entries according to SwitchBrew.
2018-12-05service/ldr: Corrent padding within the NRR header layoutLioncash1-1/+2
The padding after the magic signature value should be 12 bytes rather than 28 bytes. The other 16 should be placed after the title ID pattern.
2018-11-26Changed logging to be "Log before execution", Added more error logging, all services should now log on some levelDavid Marcec1-1/+11
2018-11-19ldr: Clean up error codesLioncash1-29/+12
The separate enum isn't particularly necessary here, and the values can just be directly put into the ResultCode instances, given the names are also self-documenting here.
2018-11-18ldr_ro: Add error check for memory allocation failureZach Hilman1-7/+20
2018-11-15ldr_ro: Implement UnloadNro (command 1)Zach Hilman1-22/+85
Includes actual unmapping and address error checking.
2018-11-15ldr_ro: Fully Implement LoadNro (command 0)Zach Hilman1-11/+110
Includes NRO and BSS error checking, maximum loaded NRO check, NRR hash check, and proper remapping of BSS data.
2018-11-15ldr_ro: Implement UnloadNrr (command 3)Zach Hilman1-2/+84
Includes initialization check, proper address check, alignment check, and actual unloading of a loaded NRR.
2018-11-15ldr_ro: Fully implement LoadNrr (command 2)Zach Hilman1-0/+112
Includes parameter error checking, hash enforcement, initialization check, and max NRR load check.
2018-10-26ldr: Partially implement LoadNro.bunnei1-3/+49
- This is an incomplete implementation. It was tested with Super Mario Party.
2018-07-26service: Add ldr servicesLioncash2-0/+97
Adds the skeleton for the ldr-related services based off the information provided on Switch Brew.