diff options
| author | 2019-03-21 21:43:15 -0400 | |
|---|---|---|
| committer | 2019-03-21 21:43:15 -0400 | |
| commit | 4d95adcac589f334edad655c81e56118b020c52e (patch) | |
| tree | e495cfe90663271f1e0ae1729336f8350134195f /src/core/hle/kernel | |
| parent | Merge pull request #2276 from lioncash/am (diff) | |
| parent | kernel/vm_manager: Rename CodeStatic/CodeMutable to Code and CodeData respect... (diff) | |
| download | yuzu-4d95adcac589f334edad655c81e56118b020c52e.tar.gz yuzu-4d95adcac589f334edad655c81e56118b020c52e.tar.xz yuzu-4d95adcac589f334edad655c81e56118b020c52e.zip | |
Merge pull request #2275 from lioncash/memflags
kernel/vm_manager: Amend flag value for code data
Diffstat (limited to 'src/core/hle/kernel')
| -rw-r--r-- | src/core/hle/kernel/process.cpp | 6 | ||||
| -rw-r--r-- | src/core/hle/kernel/vm_manager.cpp | 20 | ||||
| -rw-r--r-- | src/core/hle/kernel/vm_manager.h | 8 |
3 files changed, 17 insertions, 17 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp index 15a16ae14..83cfea0d4 100644 --- a/src/core/hle/kernel/process.cpp +++ b/src/core/hle/kernel/process.cpp | |||
| @@ -220,9 +220,9 @@ void Process::LoadModule(CodeSet module_, VAddr base_addr) { | |||
| 220 | }; | 220 | }; |
| 221 | 221 | ||
| 222 | // Map CodeSet segments | 222 | // Map CodeSet segments |
| 223 | MapSegment(module_.CodeSegment(), VMAPermission::ReadExecute, MemoryState::CodeStatic); | 223 | MapSegment(module_.CodeSegment(), VMAPermission::ReadExecute, MemoryState::Code); |
| 224 | MapSegment(module_.RODataSegment(), VMAPermission::Read, MemoryState::CodeMutable); | 224 | MapSegment(module_.RODataSegment(), VMAPermission::Read, MemoryState::CodeData); |
| 225 | MapSegment(module_.DataSegment(), VMAPermission::ReadWrite, MemoryState::CodeMutable); | 225 | MapSegment(module_.DataSegment(), VMAPermission::ReadWrite, MemoryState::CodeData); |
| 226 | 226 | ||
| 227 | // Clear instruction cache in CPU JIT | 227 | // Clear instruction cache in CPU JIT |
| 228 | system.InvalidateCpuInstructionCaches(); | 228 | system.InvalidateCpuInstructionCaches(); |
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp index 3def3e52c..22bf55ce7 100644 --- a/src/core/hle/kernel/vm_manager.cpp +++ b/src/core/hle/kernel/vm_manager.cpp | |||
| @@ -20,16 +20,16 @@ namespace Kernel { | |||
| 20 | namespace { | 20 | namespace { |
| 21 | const char* GetMemoryStateName(MemoryState state) { | 21 | const char* GetMemoryStateName(MemoryState state) { |
| 22 | static constexpr const char* names[] = { | 22 | static constexpr const char* names[] = { |
| 23 | "Unmapped", "Io", | 23 | "Unmapped", "Io", |
| 24 | "Normal", "CodeStatic", | 24 | "Normal", "Code", |
| 25 | "CodeMutable", "Heap", | 25 | "CodeData", "Heap", |
| 26 | "Shared", "Unknown1", | 26 | "Shared", "Unknown1", |
| 27 | "ModuleCodeStatic", "ModuleCodeMutable", | 27 | "ModuleCode", "ModuleCodeData", |
| 28 | "IpcBuffer0", "Stack", | 28 | "IpcBuffer0", "Stack", |
| 29 | "ThreadLocal", "TransferMemoryIsolated", | 29 | "ThreadLocal", "TransferMemoryIsolated", |
| 30 | "TransferMemory", "ProcessMemory", | 30 | "TransferMemory", "ProcessMemory", |
| 31 | "Inaccessible", "IpcBuffer1", | 31 | "Inaccessible", "IpcBuffer1", |
| 32 | "IpcBuffer3", "KernelStack", | 32 | "IpcBuffer3", "KernelStack", |
| 33 | }; | 33 | }; |
| 34 | 34 | ||
| 35 | return names[ToSvcMemoryState(state)]; | 35 | return names[ToSvcMemoryState(state)]; |
diff --git a/src/core/hle/kernel/vm_manager.h b/src/core/hle/kernel/vm_manager.h index 13ff4ebb3..7cdff6094 100644 --- a/src/core/hle/kernel/vm_manager.h +++ b/src/core/hle/kernel/vm_manager.h | |||
| @@ -165,12 +165,12 @@ enum class MemoryState : u32 { | |||
| 165 | Unmapped = 0x00, | 165 | Unmapped = 0x00, |
| 166 | Io = 0x01 | FlagMapped, | 166 | Io = 0x01 | FlagMapped, |
| 167 | Normal = 0x02 | FlagMapped | FlagQueryPhysicalAddressAllowed, | 167 | Normal = 0x02 | FlagMapped | FlagQueryPhysicalAddressAllowed, |
| 168 | CodeStatic = 0x03 | CodeFlags | FlagMapProcess, | 168 | Code = 0x03 | CodeFlags | FlagMapProcess, |
| 169 | CodeMutable = 0x04 | CodeFlags | FlagMapProcess | FlagCodeMemory, | 169 | CodeData = 0x04 | DataFlags | FlagMapProcess | FlagCodeMemory, |
| 170 | Heap = 0x05 | DataFlags | FlagCodeMemory, | 170 | Heap = 0x05 | DataFlags | FlagCodeMemory, |
| 171 | Shared = 0x06 | FlagMapped | FlagMemoryPoolAllocated, | 171 | Shared = 0x06 | FlagMapped | FlagMemoryPoolAllocated, |
| 172 | ModuleCodeStatic = 0x08 | CodeFlags | FlagModule | FlagMapProcess, | 172 | ModuleCode = 0x08 | CodeFlags | FlagModule | FlagMapProcess, |
| 173 | ModuleCodeMutable = 0x09 | DataFlags | FlagModule | FlagMapProcess | FlagCodeMemory, | 173 | ModuleCodeData = 0x09 | DataFlags | FlagModule | FlagMapProcess | FlagCodeMemory, |
| 174 | 174 | ||
| 175 | IpcBuffer0 = 0x0A | FlagMapped | FlagQueryPhysicalAddressAllowed | FlagMemoryPoolAllocated | | 175 | IpcBuffer0 = 0x0A | FlagMapped | FlagQueryPhysicalAddressAllowed | FlagMemoryPoolAllocated | |
| 176 | IPCFlags | FlagSharedDevice | FlagSharedDeviceAligned, | 176 | IPCFlags | FlagSharedDevice | FlagSharedDeviceAligned, |