mirror of
https://github.com/starr-dusT/yuzu-mainline
synced 2024-03-05 21:12:25 -08:00
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.
This commit is contained in:
parent
366985ca92
commit
c02b8c895b
@ -8,22 +8,6 @@
|
|||||||
|
|
||||||
namespace Kernel {
|
namespace Kernel {
|
||||||
|
|
||||||
struct MemoryInfo {
|
|
||||||
u64 base_address;
|
|
||||||
u64 size;
|
|
||||||
u32 type;
|
|
||||||
u32 attributes;
|
|
||||||
u32 permission;
|
|
||||||
u32 device_refcount;
|
|
||||||
u32 ipc_refcount;
|
|
||||||
INSERT_PADDING_WORDS(1);
|
|
||||||
};
|
|
||||||
static_assert(sizeof(MemoryInfo) == 0x28, "MemoryInfo has incorrect size.");
|
|
||||||
|
|
||||||
struct PageInfo {
|
|
||||||
u64 flags;
|
|
||||||
};
|
|
||||||
|
|
||||||
void CallSVC(u32 immediate);
|
void CallSVC(u32 immediate);
|
||||||
|
|
||||||
} // namespace Kernel
|
} // namespace Kernel
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "core/arm/arm_interface.h"
|
#include "core/arm/arm_interface.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hle/kernel/svc.h"
|
#include "core/hle/kernel/vm_manager.h"
|
||||||
#include "core/hle/result.h"
|
#include "core/hle/result.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
|
|
||||||
|
@ -150,6 +150,21 @@ constexpr u32 ToSvcMemoryState(MemoryState state) {
|
|||||||
return static_cast<u32>(state & MemoryState::Mask);
|
return static_cast<u32>(state & MemoryState::Mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct MemoryInfo {
|
||||||
|
u64 base_address;
|
||||||
|
u64 size;
|
||||||
|
u32 type;
|
||||||
|
u32 attributes;
|
||||||
|
u32 permission;
|
||||||
|
u32 device_refcount;
|
||||||
|
u32 ipc_refcount;
|
||||||
|
};
|
||||||
|
static_assert(sizeof(MemoryInfo) == 0x28, "MemoryInfo has incorrect size.");
|
||||||
|
|
||||||
|
struct PageInfo {
|
||||||
|
u32 flags;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a VMA in an address space. A VMA is a contiguous region of virtual addressing space
|
* Represents a VMA in an address space. A VMA is a contiguous region of virtual addressing space
|
||||||
* with homogeneous attributes across its extents. In this particular implementation each VMA is
|
* with homogeneous attributes across its extents. In this particular implementation each VMA is
|
||||||
|
Loading…
Reference in New Issue
Block a user