summaryrefslogtreecommitdiff
path: root/src/core/loader (follow)
Commit message (Collapse)AuthorAgeFilesLines
* core/core: Replace includes with forward declarations where applicableGravatar Lioncash2018-08-314-0/+4
| | | | | | | | | | | 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 stateGravatar Lioncash2018-08-284-7/+16
| | | | | | | | | | | | | | | | | | | | | | 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.
* file_sys/crypto: Fix missing/unnecessary includesGravatar Zach Hilman2018-08-241-1/+0
|
* file_sys: Cut down on includes and copiesGravatar Zach Hilman2018-08-232-4/+11
|
* loader: Add new NAX-specific errors and messagesGravatar Zach Hilman2018-08-232-1/+27
|
* nax: Add AppLoader_NAX and update loader to support itGravatar Zach Hilman2018-08-234-2/+121
|
* xci: Fix error masking issueGravatar Zach Hilman2018-08-231-5/+6
| | | | Prevents NCA-related errors from being masked into MissingProgramNCA or MissingKeyFile
* service/filesystem: Use forward declarations where applicableGravatar Lioncash2018-08-202-0/+2
| | | | | | | | Avoids the need to rebuild multiple source files if the filesystem code headers change. This also gets rid of a few instances of indirect inclusions being relied upon
* Merge pull request #1075 from lioncash/includeGravatar bunnei2018-08-164-35/+22
|\ | | | | loader/{nca, xci}: Remove unnecessary includes and unused member variables
| * loader/nca: Remove unnecessary includes and member variablesGravatar Lioncash2018-08-152-20/+11
| |
| * loader/xci: Remove unnecessary includes and member variablesGravatar Lioncash2018-08-152-15/+11
| | | | | | | | | | | | | | | | Many of these aren't necessary and will cause this file to be required to be recompiled whenever any changes to those files are made, which lengthens compile times for no reason. This also removes an unused metadata variable from AppLoader_XCI
* | Merge pull request #1005 from DarkLordZach/registered-fmtGravatar bunnei2018-08-151-0/+2
|\ \ | | | | | | file_sys: Add support for registration format
| * | loader: Recognize filename '00' as NCAGravatar Zach Hilman2018-08-111-0/+2
| | | | | | | | | | | | Needed to avoid mismatch filetype warnings on split NAND NCAs
* | | loader: Make ResultStatus directly compatible with fmtGravatar Lioncash2018-08-152-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | We can make the enum class type compatible with fmt by providing an overload of operator<<. While we're at it, perform proper bounds checking. If something exceeds the array, it should be a hard fail, because it's, without a doubt, a programmer error in this case.
* | | loader: Remove address mapping remnants from citraGravatar Lioncash2018-08-146-17/+0
| |/ |/| | | | | These mappings are leftovers from citra and don't apply to the Switch.
* | made ResultStatus a u16Gravatar David Marcec2018-08-121-1/+1
| |
* | Fixed invalid cast in loaderGravatar David Marcec2018-08-121-1/+1
|/ | | | GetMessageForResultStatus takes a u16, not a size_t.
* loader: Add more descriptive errorsGravatar Zach Hilman2018-08-097-31/+111
| | | Full list of new errors and descriptions in core/loader/loader.h
* loader: Remove unused IdentifyFile overloadGravatar Zach Hilman2018-08-082-12/+0
|
* Merge pull request #850 from DarkLordZach/icon-metaGravatar bunnei2018-08-088-8/+115
|\ | | | | Add Icons and Metadata Support
| * loader: Add icon and title support to XCIGravatar Zach Hilman2018-08-063-3/+37
| |
| * Use const where applicableGravatar Zach Hilman2018-08-061-1/+1
| |
| * Avoid parsing RomFS to directory in NCAGravatar Zach Hilman2018-08-066-6/+79
| |
* | loader: Fix scope error in DeconstructedRomDirectoryGravatar Zach Hilman2018-08-071-1/+1
|/
* loader: Make AppLoader_NCA rely on directory loading codeGravatar Zach Hilman2018-08-054-37/+24
| | | Eliminates duplicate code shared between their Load methods, after all the only difference is how the romfs is handled.
* Merge pull request #849 from DarkLordZach/xciGravatar bunnei2018-08-046-7/+145
|\ | | | | XCI and Encrypted NCA Support
| * Fix merge conflicts with opus and update docsGravatar Zach Hilman2018-08-011-0/+2
| |
| * Use more descriptive error codes and messagesGravatar Zach Hilman2018-08-012-2/+3
| |
| * Use ErrorEncrypted where applicable and fix no keys crashGravatar Zach Hilman2018-08-011-0/+4
| |
| * Add missing includes and use const where applicableGravatar Zach Hilman2018-08-011-0/+3
| |
| * Make XCI comply to review and style guidelinesGravatar Zach Hilman2018-08-012-5/+5
| |
| * Remove files that are not usedGravatar Zach Hilman2018-08-016-6/+134
| |
* | kernel/process: Use accessors instead of class members for referencing ↵Gravatar Lioncash2018-08-033-5/+5
| | | | | | | | | | | | | | | | | | segment array 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.
* | kernel: Move object class to its own source filesGravatar Lioncash2018-08-015-5/+5
|/ | | | | | General moving to keep kernel object types separate from the direct kernel code. Also essentially a preliminary cleanup before eliminating global kernel state in the kernel code.
* deconstructed_rom_directory: Remove unused FindRomFS() functionGravatar Lioncash2018-07-241-29/+0
|
* core: Make converting constructors explicit where applicableGravatar Lioncash2018-07-232-2/+2
| | | | | Avoids unwanted implicit conversions. Thankfully, given the large amount of cleanup in past PRs, only this tiny amount is left over to cover.
* Merge pull request #784 from lioncash/loaderGravatar bunnei2018-07-231-1/+1
|\ | | | | loader: Minor cleanup
| * loader: Remove unnecessary constructor call in IdentifyFile()Gravatar Lioncash2018-07-231-1/+1
| | | | | | | | | | | | RealVfsFile inherits from VfsFile, the instance from std::make_shared is already compatible with the function argument type, making the copy constructor call unnecessary.
* | Merge pull request #783 from lioncash/linkerGravatar bunnei2018-07-232-7/+4
|\ \ | | | | | | linker: Remove unused parameter from WriteRelocations()
| * | linker: Remove unused parameter from WriteRelocations()Gravatar Lioncash2018-07-232-7/+4
| |/ | | | | | | | | is_jump_relocation is never used within the function, so we can just remove it.
* | nro: Replace inclusion with a forward declarationGravatar Lioncash2018-07-232-1/+8
| | | | | | | | | | It's sufficient to use a forward declaration instead of a direct inclusion here.
* | nro: Make bracing consistentGravatar Lioncash2018-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: Make constructor explicitGravatar Lioncash2018-07-231-1/+1
| | | | | | | | | | Makes it consistent with the other Apploader constructors, and prevents implicit conversions.
* | nro: Remove unused forward declarationGravatar Lioncash2018-07-231-2/+0
|/ | | | This isn't used anywhere in the header.
* NRO Assets and NACP file formatGravatar Zach Hilman2018-07-232-1/+90
| | | | | | Cleanup Review fixes
* file_util, vfs: Use std::string_view where applicableGravatar Lioncash2018-07-221-1/+2
| | | | | Avoids unnecessary construction of std::string instances where applicable.
* file_util: Use a u64 to represent number of entriesGravatar Lioncash2018-07-211-1/+1
| | | | | This avoids a truncating cast on size. I doubt we'd ever traverse a directory this large, however we also shouldn't truncate sizes away.
* Merge pull request #752 from Subv/vfs_loadGravatar bunnei2018-07-201-5/+2
|\ | | | | Loader: Only print the module names and addresses if they actually exist.
| * Loader: Only print the module names and addresses if they actually exist.Gravatar Subv2018-07-201-5/+2
| |
* | Merge pull request #737 from lioncash/moveGravatar bunnei2018-07-202-2/+4
|\ \ | | | | | | filesys/loader: std::move VirtualFile instances in constructors where applicable