summaryrefslogtreecommitdiff
path: root/src/core/memory_setup.h
diff options
context:
space:
mode:
authorGravatar bunnei2019-11-28 11:43:17 -0500
committerGravatar GitHub2019-11-28 11:43:17 -0500
commite3ee017e91ef4d713f1af8cb60c5157e40d43f18 (patch)
treee0a5b47cac1d548599b8ceba7f71b40746fe6b48 /src/core/memory_setup.h
parentMerge pull request #3171 from lioncash/internal-link (diff)
parentcore/memory; Migrate over SetCurrentPageTable() to the Memory class (diff)
downloadyuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.tar.gz
yuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.tar.xz
yuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.zip
Merge pull request #3169 from lioncash/memory
core/memory: Deglobalize memory management code
Diffstat (limited to 'src/core/memory_setup.h')
-rw-r--r--src/core/memory_setup.h43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/core/memory_setup.h b/src/core/memory_setup.h
deleted file mode 100644
index 5225ee8e2..000000000
--- a/src/core/memory_setup.h
+++ /dev/null
@@ -1,43 +0,0 @@
1// Copyright 2015 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "common/common_types.h"
8#include "common/memory_hook.h"
9
10namespace Common {
11struct PageTable;
12}
13
14namespace Memory {
15
16/**
17 * Maps an allocated buffer onto a region of the emulated process address space.
18 *
19 * @param page_table The page table of the emulated process.
20 * @param base The address to start mapping at. Must be page-aligned.
21 * @param size The amount of bytes to map. Must be page-aligned.
22 * @param target Buffer with the memory backing the mapping. Must be of length at least `size`.
23 */
24void MapMemoryRegion(Common::PageTable& page_table, VAddr base, u64 size, u8* target);
25
26/**
27 * Maps a region of the emulated process address space as a IO region.
28 * @param page_table The page table of the emulated process.
29 * @param base The address to start mapping at. Must be page-aligned.
30 * @param size The amount of bytes to map. Must be page-aligned.
31 * @param mmio_handler The handler that backs the mapping.
32 */
33void MapIoRegion(Common::PageTable& page_table, VAddr base, u64 size,
34 Common::MemoryHookPointer mmio_handler);
35
36void UnmapRegion(Common::PageTable& page_table, VAddr base, u64 size);
37
38void AddDebugHook(Common::PageTable& page_table, VAddr base, u64 size,
39 Common::MemoryHookPointer hook);
40void RemoveDebugHook(Common::PageTable& page_table, VAddr base, u64 size,
41 Common::MemoryHookPointer hook);
42
43} // namespace Memory