diff options
| author | 2015-08-05 21:26:52 -0300 | |
|---|---|---|
| committer | 2015-08-16 01:03:47 -0300 | |
| commit | 74d4bc0af1d2f22105bf3c00efcb85613d59cc19 (patch) | |
| tree | 171c5d0508d99f9ef4dcba2a0e3543eb9bdfa1db /src/core/hle/kernel/process.h | |
| parent | HLE: Remove empty ConfigMem and SharedPage Shutdown functions (diff) | |
| download | yuzu-74d4bc0af1d2f22105bf3c00efcb85613d59cc19.tar.gz yuzu-74d4bc0af1d2f22105bf3c00efcb85613d59cc19.tar.xz yuzu-74d4bc0af1d2f22105bf3c00efcb85613d59cc19.zip | |
Kernel: Add more infrastructure to support different memory layouts
This adds some structures necessary to support multiple memory regions
in the future. It also adds support for different system memory types
and the new linear heap mapping at 0x30000000.
Diffstat (limited to 'src/core/hle/kernel/process.h')
| -rw-r--r-- | src/core/hle/kernel/process.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h index 5c7de9044..7c3a78b9e 100644 --- a/src/core/hle/kernel/process.h +++ b/src/core/hle/kernel/process.h | |||
| @@ -49,6 +49,7 @@ union ProcessFlags { | |||
| 49 | }; | 49 | }; |
| 50 | 50 | ||
| 51 | class ResourceLimit; | 51 | class ResourceLimit; |
| 52 | struct MemoryRegionInfo; | ||
| 52 | 53 | ||
| 53 | struct CodeSet final : public Object { | 54 | struct CodeSet final : public Object { |
| 54 | static SharedPtr<CodeSet> Create(std::string name, u64 program_id); | 55 | static SharedPtr<CodeSet> Create(std::string name, u64 program_id); |
| @@ -135,11 +136,14 @@ public: | |||
| 135 | // The left/right bounds of the address space covered by heap_memory. | 136 | // The left/right bounds of the address space covered by heap_memory. |
| 136 | VAddr heap_start = 0, heap_end = 0; | 137 | VAddr heap_start = 0, heap_end = 0; |
| 137 | 138 | ||
| 138 | std::shared_ptr<std::vector<u8>> linear_heap_memory; | 139 | MemoryRegionInfo* memory_region = nullptr; |
| 139 | 140 | ||
| 140 | /// Bitmask of the used TLS slots | 141 | /// Bitmask of the used TLS slots |
| 141 | std::bitset<300> used_tls_slots; | 142 | std::bitset<300> used_tls_slots; |
| 142 | 143 | ||
| 144 | VAddr GetLinearHeapBase() const; | ||
| 145 | VAddr GetLinearHeapLimit() const; | ||
| 146 | |||
| 143 | ResultVal<VAddr> HeapAllocate(VAddr target, u32 size, VMAPermission perms); | 147 | ResultVal<VAddr> HeapAllocate(VAddr target, u32 size, VMAPermission perms); |
| 144 | ResultCode HeapFree(VAddr target, u32 size); | 148 | ResultCode HeapFree(VAddr target, u32 size); |
| 145 | 149 | ||