diff options
| author | 2018-12-19 23:50:20 -0500 | |
|---|---|---|
| committer | 2018-12-21 07:05:34 -0500 | |
| commit | 002ae08bbd3e5e851d8a682203462efbcf59e3dd (patch) | |
| tree | 231239717b1035634a2d6ec5d09622fd7a5c6f4b /src/core/loader | |
| parent | kernel/process_capability: Handle debug capability flags (diff) | |
| download | yuzu-002ae08bbd3e5e851d8a682203462efbcf59e3dd.tar.gz yuzu-002ae08bbd3e5e851d8a682203462efbcf59e3dd.tar.xz yuzu-002ae08bbd3e5e851d8a682203462efbcf59e3dd.zip | |
kernel/process: Hook up the process capability parser to the process itself
While we're at it, we can also toss out the leftover capability parsing
from Citra.
Diffstat (limited to 'src/core/loader')
| -rw-r--r-- | src/core/loader/deconstructed_rom_directory.cpp | 5 | ||||
| -rw-r--r-- | src/core/loader/loader.cpp | 4 | ||||
| -rw-r--r-- | src/core/loader/loader.h | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/core/loader/deconstructed_rom_directory.cpp b/src/core/loader/deconstructed_rom_directory.cpp index ac04d72d7..07aa7a1cd 100644 --- a/src/core/loader/deconstructed_rom_directory.cpp +++ b/src/core/loader/deconstructed_rom_directory.cpp | |||
| @@ -129,7 +129,10 @@ ResultStatus AppLoader_DeconstructedRomDirectory::Load(Kernel::Process& process) | |||
| 129 | return ResultStatus::Error32BitISA; | 129 | return ResultStatus::Error32BitISA; |
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | process.LoadFromMetadata(metadata); | 132 | if (process.LoadFromMetadata(metadata).IsError()) { |
| 133 | return ResultStatus::ErrorUnableToParseKernelMetadata; | ||
| 134 | } | ||
| 135 | |||
| 133 | const FileSys::PatchManager pm(metadata.GetTitleID()); | 136 | const FileSys::PatchManager pm(metadata.GetTitleID()); |
| 134 | 137 | ||
| 135 | // Load NSO modules | 138 | // Load NSO modules |
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp index 9cd0b0ccd..d8cc30959 100644 --- a/src/core/loader/loader.cpp +++ b/src/core/loader/loader.cpp | |||
| @@ -93,7 +93,7 @@ std::string GetFileTypeString(FileType type) { | |||
| 93 | return "unknown"; | 93 | return "unknown"; |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | constexpr std::array<const char*, 60> RESULT_MESSAGES{ | 96 | constexpr std::array<const char*, 62> RESULT_MESSAGES{ |
| 97 | "The operation completed successfully.", | 97 | "The operation completed successfully.", |
| 98 | "The loader requested to load is already loaded.", | 98 | "The loader requested to load is already loaded.", |
| 99 | "The operation is not implemented.", | 99 | "The operation is not implemented.", |
| @@ -103,6 +103,7 @@ constexpr std::array<const char*, 60> RESULT_MESSAGES{ | |||
| 103 | "The NPDM has a bad ACI header,", | 103 | "The NPDM has a bad ACI header,", |
| 104 | "The NPDM file has a bad file access control.", | 104 | "The NPDM file has a bad file access control.", |
| 105 | "The NPDM has a bad file access header.", | 105 | "The NPDM has a bad file access header.", |
| 106 | "The NPDM has bad kernel capability descriptors.", | ||
| 106 | "The PFS/HFS partition has a bad header.", | 107 | "The PFS/HFS partition has a bad header.", |
| 107 | "The PFS/HFS partition has incorrect size as determined by the header.", | 108 | "The PFS/HFS partition has incorrect size as determined by the header.", |
| 108 | "The NCA file has a bad header.", | 109 | "The NCA file has a bad header.", |
| @@ -125,6 +126,7 @@ constexpr std::array<const char*, 60> RESULT_MESSAGES{ | |||
| 125 | "The file could not be found or does not exist.", | 126 | "The file could not be found or does not exist.", |
| 126 | "The game is missing a program metadata file (main.npdm).", | 127 | "The game is missing a program metadata file (main.npdm).", |
| 127 | "The game uses the currently-unimplemented 32-bit architecture.", | 128 | "The game uses the currently-unimplemented 32-bit architecture.", |
| 129 | "Unable to completely parse the kernel metadata when loading the emulated process", | ||
| 128 | "The RomFS could not be found.", | 130 | "The RomFS could not be found.", |
| 129 | "The ELF file has incorrect size as determined by the header.", | 131 | "The ELF file has incorrect size as determined by the header.", |
| 130 | "There was a general error loading the NRO into emulated memory.", | 132 | "There was a general error loading the NRO into emulated memory.", |
diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h index 0838e303b..a39cb812d 100644 --- a/src/core/loader/loader.h +++ b/src/core/loader/loader.h | |||
| @@ -67,6 +67,7 @@ enum class ResultStatus : u16 { | |||
| 67 | ErrorBadACIHeader, | 67 | ErrorBadACIHeader, |
| 68 | ErrorBadFileAccessControl, | 68 | ErrorBadFileAccessControl, |
| 69 | ErrorBadFileAccessHeader, | 69 | ErrorBadFileAccessHeader, |
| 70 | ErrorBadKernelCapabilityDescriptors, | ||
| 70 | ErrorBadPFSHeader, | 71 | ErrorBadPFSHeader, |
| 71 | ErrorIncorrectPFSFileSize, | 72 | ErrorIncorrectPFSFileSize, |
| 72 | ErrorBadNCAHeader, | 73 | ErrorBadNCAHeader, |
| @@ -89,6 +90,7 @@ enum class ResultStatus : u16 { | |||
| 89 | ErrorNullFile, | 90 | ErrorNullFile, |
| 90 | ErrorMissingNPDM, | 91 | ErrorMissingNPDM, |
| 91 | Error32BitISA, | 92 | Error32BitISA, |
| 93 | ErrorUnableToParseKernelMetadata, | ||
| 92 | ErrorNoRomFS, | 94 | ErrorNoRomFS, |
| 93 | ErrorIncorrectELFFileSize, | 95 | ErrorIncorrectELFFileSize, |
| 94 | ErrorLoadingNRO, | 96 | ErrorLoadingNRO, |