summaryrefslogtreecommitdiffstats
path: root/src/core/memory.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-11-18 22:18:36 +0100
committerGitHub <noreply@github.com>2022-11-18 22:18:36 +0100
commit1fb33bd1e19fe0855072b08a91353a3b457fa85d (patch)
tree3687b2c5e394843e4554b0e0ca733d840aca8720 /src/core/memory.h
parentMerge pull request #9244 from liamwhite/lost-wakeup (diff)
parentkernel: implement FlushProcessDataCache (diff)
downloadyuzu-1fb33bd1e19fe0855072b08a91353a3b457fa85d.tar
yuzu-1fb33bd1e19fe0855072b08a91353a3b457fa85d.tar.gz
yuzu-1fb33bd1e19fe0855072b08a91353a3b457fa85d.tar.bz2
yuzu-1fb33bd1e19fe0855072b08a91353a3b457fa85d.tar.lz
yuzu-1fb33bd1e19fe0855072b08a91353a3b457fa85d.tar.xz
yuzu-1fb33bd1e19fe0855072b08a91353a3b457fa85d.tar.zst
yuzu-1fb33bd1e19fe0855072b08a91353a3b457fa85d.zip
Diffstat (limited to '')
-rw-r--r--src/core/memory.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/core/memory.h b/src/core/memory.h
index 81eac448b..31fe699d8 100644
--- a/src/core/memory.h
+++ b/src/core/memory.h
@@ -7,6 +7,7 @@
#include <memory>
#include <string>
#include "common/common_types.h"
+#include "core/hle/result.h"
namespace Common {
struct PageTable;
@@ -450,6 +451,39 @@ public:
void ZeroBlock(const Kernel::KProcess& process, VAddr dest_addr, std::size_t size);
/**
+ * Invalidates a range of bytes within the current process' address space at the specified
+ * virtual address.
+ *
+ * @param process The process that will have data invalidated within its address space.
+ * @param dest_addr The destination virtual address to invalidate the data from.
+ * @param size The size of the range to invalidate, in bytes.
+ *
+ */
+ Result InvalidateDataCache(const Kernel::KProcess& process, VAddr dest_addr, std::size_t size);
+
+ /**
+ * Stores a range of bytes within the current process' address space at the specified
+ * virtual address.
+ *
+ * @param process The process that will have data stored within its address space.
+ * @param dest_addr The destination virtual address to store the data from.
+ * @param size The size of the range to store, in bytes.
+ *
+ */
+ Result StoreDataCache(const Kernel::KProcess& process, VAddr dest_addr, std::size_t size);
+
+ /**
+ * Flushes a range of bytes within the current process' address space at the specified
+ * virtual address.
+ *
+ * @param process The process that will have data flushed within its address space.
+ * @param dest_addr The destination virtual address to flush the data from.
+ * @param size The size of the range to flush, in bytes.
+ *
+ */
+ Result FlushDataCache(const Kernel::KProcess& process, VAddr dest_addr, std::size_t size);
+
+ /**
* Marks each page within the specified address range as cached or uncached.
*
* @param vaddr The virtual address indicating the start of the address range.