summaryrefslogtreecommitdiff
path: root/src/common/cache_management.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-11-18 13:18:36 -0800
committerGitHub <noreply@github.com>2022-11-18 13:18:36 -0800
commit1fb33bd1e19fe0855072b08a91353a3b457fa85d (patch)
tree3687b2c5e394843e4554b0e0ca733d840aca8720 /src/common/cache_management.h
parent405d685101e60e3b9f156250f2d462f7e7217a10 (diff)
parent651f6598ac8a980700c330f382d711f7429571a8 (diff)
Merge pull request #9234 from liamwhite/data-cash-money
kernel: implement data cache management operations
Diffstat (limited to 'src/common/cache_management.h')
-rw-r--r--src/common/cache_management.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/common/cache_management.h b/src/common/cache_management.h
new file mode 100644
index 000000000..e467b87e4
--- /dev/null
+++ b/src/common/cache_management.h
@@ -0,0 +1,27 @@
+// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include "stdlib.h"
+
+namespace Common {
+
+// Data cache instructions enabled at EL0 by SCTLR_EL1.UCI.
+// VA = virtual address
+// PoC = point of coherency
+// PoU = point of unification
+
+// dc cvau
+void DataCacheLineCleanByVAToPoU(void* start, size_t size);
+
+// dc civac
+void DataCacheLineCleanAndInvalidateByVAToPoC(void* start, size_t size);
+
+// dc cvac
+void DataCacheLineCleanByVAToPoC(void* start, size_t size);
+
+// dc zva
+void DataCacheZeroByVA(void* start, size_t size);
+
+} // namespace Common