diff options
author | Zach Hilman <zachhilman@gmail.com> | 2019-06-05 06:20:26 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2019-06-05 06:20:26 +0200 |
commit | b550a01f743c6324ce3174093d1314eaf2c8ef54 (patch) | |
tree | 46d9d027a0e8cfc1bf5851f753df3d287db23807 | |
parent | partition_data_manager: Remove KIP processing and use FileSys (diff) | |
download | yuzu-b550a01f743c6324ce3174093d1314eaf2c8ef54.tar yuzu-b550a01f743c6324ce3174093d1314eaf2c8ef54.tar.gz yuzu-b550a01f743c6324ce3174093d1314eaf2c8ef54.tar.bz2 yuzu-b550a01f743c6324ce3174093d1314eaf2c8ef54.tar.lz yuzu-b550a01f743c6324ce3174093d1314eaf2c8ef54.tar.xz yuzu-b550a01f743c6324ce3174093d1314eaf2c8ef54.tar.zst yuzu-b550a01f743c6324ce3174093d1314eaf2c8ef54.zip |
-rw-r--r-- | src/core/file_sys/program_metadata.cpp | 15 | ||||
-rw-r--r-- | src/core/file_sys/program_metadata.h | 5 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/core/file_sys/program_metadata.cpp b/src/core/file_sys/program_metadata.cpp index d863253f8..eb76174c5 100644 --- a/src/core/file_sys/program_metadata.cpp +++ b/src/core/file_sys/program_metadata.cpp @@ -51,6 +51,21 @@ Loader::ResultStatus ProgramMetadata::Load(VirtualFile file) { return Loader::ResultStatus::Success; } +void ProgramMetadata::LoadManual(bool is_64_bit, ProgramAddressSpaceType address_space, + u8 main_thread_prio, u8 main_thread_core, + u32 main_thread_stack_size, u64 title_id, + u64 filesystem_permissions, + KernelCapabilityDescriptors capabilities) { + npdm_header.has_64_bit_instructions.Assign(is_64_bit); + npdm_header.address_space_type.Assign(address_space); + npdm_header.main_thread_priority = main_thread_prio; + npdm_header.main_thread_cpu = main_thread_core; + npdm_header.main_stack_size = main_thread_stack_size; + aci_header.title_id = title_id; + aci_file_access.permissions = filesystem_permissions; + aci_kernel_capabilities = std ::move(capabilities); +} + bool ProgramMetadata::Is64BitProgram() const { return npdm_header.has_64_bit_instructions; } diff --git a/src/core/file_sys/program_metadata.h b/src/core/file_sys/program_metadata.h index 7de5b9cf9..43bf2820a 100644 --- a/src/core/file_sys/program_metadata.h +++ b/src/core/file_sys/program_metadata.h @@ -46,6 +46,11 @@ public: Loader::ResultStatus Load(VirtualFile file); + // Load from parameters instead of NPDM file, used for KIP + void LoadManual(bool is_64_bit, ProgramAddressSpaceType address_space, u8 main_thread_prio, + u8 main_thread_core, u32 main_thread_stack_size, u64 title_id, + u64 filesystem_permissions, KernelCapabilityDescriptors capabilities); + bool Is64BitProgram() const; ProgramAddressSpaceType GetAddressSpaceType() const; u8 GetMainThreadPriority() const; |