summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2018-12-12 11:04:10 -0500
committerGravatar Lioncash2018-12-12 14:03:53 -0500
commitc02b8c895b49b511a4316ee5e7bf1ab9a081869b (patch)
tree12fd3273e244512cfa44ac203b963edcd5341997 /src
parentvm_manager: Amend MemoryState enum members (diff)
downloadyuzu-c02b8c895b49b511a4316ee5e7bf1ab9a081869b.tar.gz
yuzu-c02b8c895b49b511a4316ee5e7bf1ab9a081869b.tar.xz
yuzu-c02b8c895b49b511a4316ee5e7bf1ab9a081869b.zip
vm_manager: Migrate MemoryInfo and PageInfo to vm_manager.h
Gets the two structures out of an unrelated header and places them with the rest of the memory management code. This also corrects the structures. PageInfo appears to only contain a 32-bit flags member, and the extra padding word in MemoryInfo isn't necessary.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/svc.h16
-rw-r--r--src/core/hle/kernel/svc_wrap.h2
-rw-r--r--src/core/hle/kernel/vm_manager.h15
3 files changed, 16 insertions, 17 deletions
diff --git a/src/core/hle/kernel/svc.h b/src/core/hle/kernel/svc.h
index b06aac4ec..c37ae0f98 100644
--- a/src/core/hle/kernel/svc.h
+++ b/src/core/hle/kernel/svc.h
@@ -8,22 +8,6 @@
8 8
9namespace Kernel { 9namespace Kernel {
10 10
11struct MemoryInfo {
12 u64 base_address;
13 u64 size;
14 u32 type;
15 u32 attributes;
16 u32 permission;
17 u32 device_refcount;
18 u32 ipc_refcount;
19 INSERT_PADDING_WORDS(1);
20};
21static_assert(sizeof(MemoryInfo) == 0x28, "MemoryInfo has incorrect size.");
22
23struct PageInfo {
24 u64 flags;
25};
26
27void CallSVC(u32 immediate); 11void CallSVC(u32 immediate);
28 12
29} // namespace Kernel 13} // namespace Kernel
diff --git a/src/core/hle/kernel/svc_wrap.h b/src/core/hle/kernel/svc_wrap.h
index 24aef46c9..3893b0f4a 100644
--- a/src/core/hle/kernel/svc_wrap.h
+++ b/src/core/hle/kernel/svc_wrap.h
@@ -7,7 +7,7 @@
7#include "common/common_types.h" 7#include "common/common_types.h"
8#include "core/arm/arm_interface.h" 8#include "core/arm/arm_interface.h"
9#include "core/core.h" 9#include "core/core.h"
10#include "core/hle/kernel/svc.h" 10#include "core/hle/kernel/vm_manager.h"
11#include "core/hle/result.h" 11#include "core/hle/result.h"
12#include "core/memory.h" 12#include "core/memory.h"
13 13
diff --git a/src/core/hle/kernel/vm_manager.h b/src/core/hle/kernel/vm_manager.h
index 0a600c23c..35f0f276e 100644
--- a/src/core/hle/kernel/vm_manager.h
+++ b/src/core/hle/kernel/vm_manager.h
@@ -150,6 +150,21 @@ constexpr u32 ToSvcMemoryState(MemoryState state) {
150 return static_cast<u32>(state & MemoryState::Mask); 150 return static_cast<u32>(state & MemoryState::Mask);
151} 151}
152 152
153struct MemoryInfo {
154 u64 base_address;
155 u64 size;
156 u32 type;
157 u32 attributes;
158 u32 permission;
159 u32 device_refcount;
160 u32 ipc_refcount;
161};
162static_assert(sizeof(MemoryInfo) == 0x28, "MemoryInfo has incorrect size.");
163
164struct PageInfo {
165 u32 flags;
166};
167
153/** 168/**
154 * Represents a VMA in an address space. A VMA is a contiguous region of virtual addressing space 169 * Represents a VMA in an address space. A VMA is a contiguous region of virtual addressing space
155 * with homogeneous attributes across its extents. In this particular implementation each VMA is 170 * with homogeneous attributes across its extents. In this particular implementation each VMA is