summaryrefslogtreecommitdiffstats
path: root/src/core/loader/nro.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* kernel: offset code entry point for 39-bit address space type (#11326)liamwhite2023-08-251-1/+1
|
* k_process: PageTable -> GetPageTableLiam2023-07-151-1/+1
|
* android: Add proper homebrew checkCharles Lombardo2023-06-101-1/+12
|
* code: dodge PAGE_SIZE #defineKyle Kienapfel2022-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | Some header files, specifically for OSX and Musl libc define PAGE_SIZE to be a number This is great except in yuzu we're using PAGE_SIZE as a variable Specific example `static constexpr u64 PAGE_SIZE = u64(1) << PAGE_BITS;` PAGE_SIZE PAGE_BITS PAGE_MASK are all similar variables. Simply deleted the underscores, and then added YUZU_ prefix Might be worth noting that there are multiple uses in different classes/namespaces This list may not be exhaustive Core::Memory 12 bits (4096) QueryCacheBase 12 bits ShaderCache 14 bits (16384) TextureCache 20 bits (1048576, or 1MB) Fixes #8779
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | 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.
* general: Make most settings a BasicSettinglat9nq2021-06-281-2/+2
| | | | | | | | | | | Creates a new BasicSettings class in common/settings, and forces setting a default and label for each setting that uses it in common/settings. Moves defaults and labels from both frontends into common settings. Creates a helper function in each frontend to facillitate reading the settings now with the new default and label properties. Settings::Setting is also now a subclass of Settings::BasicSetting. Also adds documentation for both Setting and BasicSetting.
* common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270)Morph2021-05-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common: fs: fs_types: Create filesystem types Contains various filesystem types used by the Common::FS library * common: fs: fs_util: Add std::string to std::u8string conversion utility * common: fs: path_util: Add utlity functions for paths Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library * common: fs: file: Rewrite the IOFile implementation * common: fs: Reimplement Common::FS library using std::filesystem * common: fs: fs_paths: Add fs_paths to replace common_paths * common: fs: path_util: Add the rest of the path functions * common: Remove the previous Common::FS implementation * general: Remove unused fs includes * string_util: Remove unused function and include * nvidia_flags: Migrate to the new Common::FS library * settings: Migrate to the new Common::FS library * logging: backend: Migrate to the new Common::FS library * core: Migrate to the new Common::FS library * perf_stats: Migrate to the new Common::FS library * reporter: Migrate to the new Common::FS library * telemetry_session: Migrate to the new Common::FS library * key_manager: Migrate to the new Common::FS library * bis_factory: Migrate to the new Common::FS library * registered_cache: Migrate to the new Common::FS library * xts_archive: Migrate to the new Common::FS library * service: acc: Migrate to the new Common::FS library * applets/profile: Migrate to the new Common::FS library * applets/web: Migrate to the new Common::FS library * service: filesystem: Migrate to the new Common::FS library * loader: Migrate to the new Common::FS library * gl_shader_disk_cache: Migrate to the new Common::FS library * nsight_aftermath_tracker: Migrate to the new Common::FS library * vulkan_library: Migrate to the new Common::FS library * configure_debug: Migrate to the new Common::FS library * game_list_worker: Migrate to the new Common::FS library * config: Migrate to the new Common::FS library * configure_filesystem: Migrate to the new Common::FS library * configure_per_game_addons: Migrate to the new Common::FS library * configure_profile_manager: Migrate to the new Common::FS library * configure_ui: Migrate to the new Common::FS library * input_profiles: Migrate to the new Common::FS library * yuzu_cmd: config: Migrate to the new Common::FS library * yuzu_cmd: Migrate to the new Common::FS library * vfs_real: Migrate to the new Common::FS library * vfs: Migrate to the new Common::FS library * vfs_libzip: Migrate to the new Common::FS library * service: bcat: Migrate to the new Common::FS library * yuzu: main: Migrate to the new Common::FS library * vfs_real: Delete the contents of an existing file in CreateFile Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now. * input_profiles: Don't iterate the input profile dir if it does not exist Silences an error produced in the log if the directory does not exist. * game_list_worker: Skip parsing file if the returned VfsFile is nullptr Prevents crashes in GetLoader when the virtual file is nullptr * common: fs: Validate paths for path length * service: filesystem: Open the mod load directory as read only
* hle: kernel: Rename Process to KProcess.bunnei2021-05-061-4/+4
|
* loader: Resolve instances of variable shadowingLioncash2021-04-271-7/+6
| | | | | Eliminates variable shadowing cases across all the loaders to bring us closer to enabling variable shadowing as an error in core.
* common: Move settings to common from core.bunnei2021-04-151-1/+1
| | | | - Removes a dependency on core and input_common from common.
* hle: kernel: Migrate PageHeap/PageTable to KPageHeap/KPageTable.bunnei2021-02-191-1/+1
|
* hle: kernel: KThread: Reorganize thread priority defaults.bunnei2021-01-291-2/+2
|
* core: hle: kernel: Rename Thread to KThread.bunnei2021-01-291-1/+1
|
* core: Eliminate remaining usages of the global system instanceLioncash2020-11-271-5/+1
| | | | | | Removes all remaining usages of the global system instance. After this, migration can begin to migrate to being constructed and managed entirely by the various frontends.
* core/CMakeLists: Make some warnings errorsLioncash2020-10-131-1/+1
| | | | | | | | | Makes our error coverage a little more consistent across the board by applying it to Linux side of things as well. This also makes it more consistent with the warning settings in other libraries in the project. This also updates httplib to 0.7.9, as there are several warning cleanups made that allow us to enable several warnings as errors.
* file_sys/romfs_factory: Eliminate usage of the global system accessorLioncash2020-09-171-2/+2
|
* core/loader: Remove dependencies on the global system instanceLioncash2020-09-161-2/+2
| | | | | | | | | Now all that remains is: 18 instances in file_sys code 14 instances in GDB stub code (this can be tossed wholesale) 4 instances in HLE code 2 instances in settings code.
* loader: nro: Fix process initialization using ProgramMetadata default.bunnei2020-04-211-10/+13
|
* loader: elf/kip/nro: Updates for new VMM.bunnei2020-04-171-2/+2
|
* core: memory: Move to Core::Memory namespace.bunnei2020-04-171-2/+2
| | | | - helpful to disambiguate Kernel::Memory namespace.
* yuzu: Port old usages of Filesystem namespace to FilesystemControllerZach Hilman2019-09-211-1/+3
|
* nro: Implement ReadControlDataNick Renieris2019-09-071-0/+9
| | | | | | With this, the "Developer" field in the Properties for homebrew is now populated. Signed-off-by: Nick Renieris <velocityra@gmail.com>
* VM_Manager: Align allocated memory to 256bytesFernando Sahmkow2019-07-191-1/+1
| | | | | | This commit ensures that all backing memory allocated for the Guest CPU is aligned to 256 bytes. This due to how gpu memory works and the heavy constraints it has in the alignment of physical memory.
* core/core: Move process execution start to System's Load()Lioncash2019-04-121-7/+7
| | | | | | | | | 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.
* kernel/codeset: Make CodeSet's memory data member a regular std::vectorLioncash2019-03-221-1/+1
| | | | | | | | | | | The use of a shared_ptr is an implementation detail of the VMManager itself when mapping memory. Because of that, we shouldn't require all users of the CodeSet to have to allocate the shared_ptr ahead of time. It's intended that CodeSet simply pass in the required direct data, and that the memory manager takes care of it from that point on. This means we just do the shared pointer allocation in a single place, when loading modules, as opposed to in each loader.
* kernel: Move CodeSet structure to its own source filesLioncash2019-03-201-0/+1
| | | | | | | | Given this is utilized by the loaders, this allows avoiding inclusion of the kernel process definitions where avoidable. This also keeps the loading format for all executable data separate from the kernel objects.
* loader/nro: Make the static LoadNro function internally linkedLioncash2018-12-031-4/+5
| | | | | This simply acts as a forwarding function for the Load() function, so this doesn't need to be directly exposed.
* loader/nro: Remove dependency on the System classLioncash2018-12-031-8/+6
| | | | | | Load() is already given the process instance as a parameter, so instead of coupling the class to the System class, we can just forward that parameter to LoadNro()
* process: Make MirrorMemory take state to map new memory asZach Hilman2018-11-151-2/+5
| | | | Credits to Subv
* loader/nro: Call RegisterRomFS from LoadZach Hilman2018-10-291-0/+5
| | | | Allows NRO homebrew to use the RomFS in the ASET section.
* nro: Make LoadNro method accessible outside of apploader code.bunnei2018-10-261-6/+15
|
* nro: Make LoadNro take a VfsFile by const referenceLioncash2018-10-151-5/+5
| | | | | | This function doesn't need to care about ownership semantics, so we can just pass it a reference to the file itself, rather than a std::shared_ptr alias.
* kernel/process: Make CodeSet a regular non-inherited objectLioncash2018-10-121-12/+9
| | | | | | | | These only exist to ferry data into a Process instance and end up going out of scope quite early. Because of this, we can just make it a plain struct for holding things and just std::move it into the relevant function. There's no need to make this inherit from the kernel's Object type.
* nso/nro: Use default allocation size for arg_dataZach Hilman2018-10-071-6/+8
|
* cmd: Support passing game arguments from command lineZach Hilman2018-10-071-1/+1
| | | | Uses -p (--program) and following string as args.
* nso/nro: Add NSO arguments structure to data sectionZach Hilman2018-10-071-0/+13
| | | | Only added if arguments string is non-empty and a pass is requested by loader.
* kernel/process: Make data member variables privateLioncash2018-09-301-1/+1
| | | | | | | Makes the public interface consistent in terms of how accesses are done on a process object. It also makes it slightly nicer to reason about the logic of the process class, as we don't want to expose everything to external code.
* loader: Make the Load() function take a process as a regular reference, not a SharedPtrLioncash2018-09-291-3/+3
| | | | | | | | A process should never require being reference counted in this situation. If the handle to a process is freed before this function is called, it's definitely a bug with our lifetime management, so we can put the requirement in place for the API that the process must be a valid instance.
* memory: Dehardcode the use of fixed memory range constantsLioncash2018-09-251-3/+4
| | | | | | | | The locations of these can actually vary depending on the address space layout, so we shouldn't be using these when determining where to map memory or be using them as offsets for calculations. This keeps all the memory ranges flexible and malleable based off of the virtual memory manager instance state.
* process/vm_manager: Amend API to allow reading parameters from NPDM metadataLioncash2018-09-241-5/+0
| | | | | | | | | Rather than hard-code the address range to be 36-bit, we can derive the parameters from supplied NPDM metadata if the supplied exectuable supports it. This is the bare minimum necessary for this to be possible. The following commits will rework the memory code further to adjust to this.
* kernel/thread: Include thread-related enums within the kernel namespaceLioncash2018-09-131-1/+1
| | | | | | Previously, these were sitting outside of the Kernel namespace, which doesn't really make sense, given they're related to the Thread class which is within the Kernel namespace.
* bktr: Fix missing includes and optimize styleZach Hilman2018-09-041-1/+1
|
* loader: Ignore patches on NRO and DRDZach Hilman2018-09-041-0/+5
|
* core/core: Replace includes with forward declarations where applicableLioncash2018-08-311-0/+1
| | | | | | | | | | | The follow-up to e2457418dae19b889b2ad85255bb95d4cd0e4bff, which replaces most of the includes in the core header with forward declarations. This makes it so that if any of the headers the core header was previously including change, then no one will need to rebuild the bulk of the core, due to core.h being quite a prevalent inclusion. This should make turnaround for changes much faster for developers.
* kernel: Eliminate kernel global stateLioncash2018-08-291-2/+4
| | | | | | | | | | | | | | | | | | | | | | As means to pave the way for getting rid of global state within core, This eliminates kernel global state by removing all globals. Instead this introduces a KernelCore class which acts as a kernel instance. This instance lives in the System class, which keeps its lifetime contained to the lifetime of the System class. This also forces the kernel types to actually interact with the main kernel instance itself instead of having transient kernel state placed all over several translation units, keeping everything together. It also has a nice consequence of making dependencies much more explicit. This also makes our initialization a tad bit more correct. Previously we were creating a kernel process before the actual kernel was initialized, which doesn't really make much sense. The KernelCore class itself follows the PImpl idiom, which allows keeping all the implementation details sealed away from everything else, which forces the use of the exposed API and allows us to avoid any unnecessary inclusions within the main kernel header.
* loader: Remove address mapping remnants from citraLioncash2018-08-151-1/+0
| | | | These mappings are leftovers from citra and don't apply to the Switch.
* loader: Add more descriptive errorsZach Hilman2018-08-101-5/+5
| | | Full list of new errors and descriptions in core/loader/loader.h
* kernel/process: Use accessors instead of class members for referencing segment arrayLioncash2018-08-031-1/+1
| | | | | | | Using member variables for referencing the segments array increases the size of the class in memory for little benefit. The same behavior can be achieved through the use of accessors that just return the relevant segment.
* nro: Replace inclusion with a forward declarationLioncash2018-07-231-0/+3
| | | | | It's sufficient to use a forward declaration instead of a direct inclusion here.
* nro: Make bracing consistentLioncash2018-07-231-10/+24
| | | | | Makes the code more uniform, and also braces cases where the body of an unbraced conditional travels more than one line.
* NRO Assets and NACP file formatZach Hilman2018-07-231-1/+78
| | | | | | Cleanup Review fixes
* loader/{nca, nro}: std::move VirtualFile in the constructors where applicableLioncash2018-07-201-1/+2
| | | | This avoids unnecessary atomic reference count increments and decrements
* loader/nro: Resolve sign mismatch warningsLioncash2018-07-191-1/+1
|
* Virtual Filesystem 2: Electric Boogaloo (#676)Zach Hilman2018-07-191-22/+10
| | | | | | | | | | * Virtual Filesystem * Fix delete bug and documentate * Review fixes + other stuff * Fix puyo regression
* More improvements to GDBStub (#653)Hedges2018-07-131-0/+4
| | | | | | | | | | | * More improvements to GDBStub - Debugging of threads should work correctly with source and assembly level stepping and modifying registers and memory, meaning threads and callstacks are fully clickable in VS. - List of modules is available to the client, with assumption that .nro and .nso are backed up by an .elf with symbols, while deconstructed ROMs keep N names. - Initial support for floating point registers. * Tidy up as requested in PR feedback * Tidy up as requested in PR feedback
* Revert "Virtual Filesystem (#597)"bunnei2018-07-081-10/+22
| | | | This reverts commit 77c684c1140f6bf3fb7d4560d06d2efb1a2ee5e2.
* Virtual Filesystem (#597)Zach Hilman2018-07-061-22/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add VfsFile and VfsDirectory classes * Finish abstract Vfs classes * Implement RealVfsFile (computer fs backend) * Finish RealVfsFile and RealVfsDirectory * Finished OffsetVfsFile * More changes * Fix import paths * Major refactor * Remove double const * Use experimental/filesystem or filesystem depending on compiler * Port partition_filesystem * More changes * More Overhaul * FSP_SRV fixes * Fixes and testing * Try to get filesystem to compile * Filesystem on linux * Remove std::filesystem and document/test * Compile fixes * Missing include * Bug fixes * Fixes * Rename v_file and v_dir * clang-format fix * Rename NGLOG_* to LOG_* * Most review changes * Fix TODO * Guess 'main' to be Directory by filename
* Kernel: Use 0x2C as default main thread priority for homebrew and lone NRO/NSOsSubv2018-04-211-1/+1
|
* memory: Fix stack region.bunnei2018-03-311-1/+1
|
* kernel: Move stack region outside of application heap.bunnei2018-03-161-1/+1
|
* core: Move process creation out of global state.bunnei2018-03-141-3/+2
|
* Kernel: Store the program id in the Process class instead of the CodeSet class.Subv2018-03-021-2/+2
| | | | There may be many CodeSets per Process, so it's wasteful and overcomplicated to store the program id in each of them.
* Merge pull request #92 from gdkchan/nro_refactorbunnei2018-01-211-2/+2
|\ | | | | Fix NRO entry point
| * Fix NRO Entry Pointgdkchan2018-01-181-2/+2
| |
* | loader: Clean up ctors and includes.bunnei2018-01-201-0/+4
| |
* | loader: Refactor to also pass filepath into IdentifyType.bunnei2018-01-201-1/+1
|/
* Fix NRO loadinggdkchan2018-01-181-20/+9
|
* Remove relocation on NSO/NROgdkchan2018-01-171-9/+0
|
* yuzu: Update license text to be consistent across project.bunnei2018-01-131-1/+1
|
* core: Refactor MakeMagic usage and remove dead code.bunnei2017-10-151-3/+4
|
* Merge remote-tracking branch 'upstream/master' into nxbunnei2017-10-101-6/+6
| | | | | | | | | | | | | | | | | # Conflicts: # src/core/CMakeLists.txt # src/core/arm/dynarmic/arm_dynarmic.cpp # src/core/arm/dyncom/arm_dyncom.cpp # src/core/hle/kernel/process.cpp # src/core/hle/kernel/thread.cpp # src/core/hle/kernel/thread.h # src/core/hle/kernel/vm_manager.cpp # src/core/loader/3dsx.cpp # src/core/loader/elf.cpp # src/core/loader/ncch.cpp # src/core/memory.cpp # src/core/memory.h # src/core/memory_setup.h
* loader: Various improvements for NSO/NRO loaders.bunnei2017-10-101-14/+3
|
* loader: Add support for NRO, as well as various fixes and shared linker.bunnei2017-10-061-0/+173