diff options
author | Liam <byteslice@airmail.cc> | 2022-11-12 11:26:56 -0500 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2022-11-12 11:26:56 -0500 |
commit | 70ea1c20002e8cb9a0f9e98b1992d4c731be0041 (patch) | |
tree | 72aa8072fad6df71364db1062f3a016ccdfd381e /src/common/cache_management.h | |
parent | c973029374a731e13f2de240820c818fa2899c2b (diff) |
common: add cache management functions
Diffstat (limited to 'src/common/cache_management.h')
-rw-r--r-- | src/common/cache_management.h | 27 |
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 |