summaryrefslogtreecommitdiff
path: root/src/core/file_sys
diff options
context:
space:
mode:
authorGravatar Lioncash2018-09-22 20:09:32 -0400
committerGravatar Lioncash2018-09-24 17:24:50 -0400
commit75603b005bb9163810a02376cd33854cd1b16ef9 (patch)
treeebb28bd5ff9e0c4a57c53ee5ea6a72ce75023103 /src/core/file_sys
parentAdded glObjectLabels for renderdoc for textures and shader programs (#1384) (diff)
downloadyuzu-75603b005bb9163810a02376cd33854cd1b16ef9.tar.gz
yuzu-75603b005bb9163810a02376cd33854cd1b16ef9.tar.xz
yuzu-75603b005bb9163810a02376cd33854cd1b16ef9.zip
process/vm_manager: Amend API to allow reading parameters from NPDM metadata
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.
Diffstat (limited to 'src/core/file_sys')
-rw-r--r--src/core/file_sys/program_metadata.cpp4
-rw-r--r--src/core/file_sys/program_metadata.h6
2 files changed, 7 insertions, 3 deletions
diff --git a/src/core/file_sys/program_metadata.cpp b/src/core/file_sys/program_metadata.cpp
index 02319ce0f..8903ed1d3 100644
--- a/src/core/file_sys/program_metadata.cpp
+++ b/src/core/file_sys/program_metadata.cpp
@@ -83,10 +83,12 @@ void ProgramMetadata::Print() const {
83 83
84 auto address_space = "Unknown"; 84 auto address_space = "Unknown";
85 switch (npdm_header.address_space_type) { 85 switch (npdm_header.address_space_type) {
86 case ProgramAddressSpaceType::Is64Bit: 86 case ProgramAddressSpaceType::Is36Bit:
87 case ProgramAddressSpaceType::Is39Bit:
87 address_space = "64-bit"; 88 address_space = "64-bit";
88 break; 89 break;
89 case ProgramAddressSpaceType::Is32Bit: 90 case ProgramAddressSpaceType::Is32Bit:
91 case ProgramAddressSpaceType::Is32BitNoMap:
90 address_space = "32-bit"; 92 address_space = "32-bit";
91 break; 93 break;
92 } 94 }
diff --git a/src/core/file_sys/program_metadata.h b/src/core/file_sys/program_metadata.h
index 1143e36c4..e4470d6f0 100644
--- a/src/core/file_sys/program_metadata.h
+++ b/src/core/file_sys/program_metadata.h
@@ -17,8 +17,10 @@ enum class ResultStatus : u16;
17namespace FileSys { 17namespace FileSys {
18 18
19enum class ProgramAddressSpaceType : u8 { 19enum class ProgramAddressSpaceType : u8 {
20 Is64Bit = 1, 20 Is32Bit = 0,
21 Is32Bit = 2, 21 Is36Bit = 1,
22 Is32BitNoMap = 2,
23 Is39Bit = 3,
22}; 24};
23 25
24enum class ProgramFilePermission : u64 { 26enum class ProgramFilePermission : u64 {