summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BaseLib/BaseLib.inf
diff options
context:
space:
mode:
authorDhaval <dhaval@rivosinc.com>2023-12-13 20:29:29 +0530
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-12-19 12:48:14 +0000
commit26727c2ae2a8883b7f4be23c26b6209ea763c816 (patch)
treeaf3ecdffb261840db0d01e46b602ab5d35a93e7c /MdePkg/Library/BaseLib/BaseLib.inf
parent30faafd0247af0a6534caf2a6ac3231fa8e63d86 (diff)
downloadedk2-26727c2ae2a8883b7f4be23c26b6209ea763c816.tar.gz
edk2-26727c2ae2a8883b7f4be23c26b6209ea763c816.tar.bz2
edk2-26727c2ae2a8883b7f4be23c26b6209ea763c816.zip
MdePkg: Implement RISC-V Cache Management Operations
Implement Cache Management Operations (CMO) defined by RISC-V spec https://github.com/riscv/riscv-CMOs. Notes: 1. CMO only supports block based Operations. Meaning cache flush/invd/clean Operations are not available for the entire range. In that case we fallback on fence.i instructions. 2. Operations are implemented using Opcodes to make them compiler independent. binutils 2.39+ compilers support CMO instructions. Test: 1. Ensured correct instructions are refelecting in asm 2. Qemu implements basic support for CMO operations in that it allwos instructions without exceptions. Verified it works properly in that sense. 3. SG2042Pkg implements CMO-like instructions. It was verified that CpuFlushCpuDataCache works fine. This more of less confirms that framework is alright. 4. TODO: Once Silicon is available with exact instructions, we will further verify this. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Sunil V L <sunilvl@ventanamicro.com> Cc: Daniel Schaefer <git@danielschaefer.me> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Pedro Falcato <pedro.falcato@gmail.com> Signed-off-by: Dhaval Sharma <dhaval@rivosinc.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Sunil V L <sunilvl@...> Reviewed-by: Jingyu Li <jingyu.li01@...>
Diffstat (limited to 'MdePkg/Library/BaseLib/BaseLib.inf')
-rw-r--r--MdePkg/Library/BaseLib/BaseLib.inf2
1 files changed, 1 insertions, 1 deletions
diff --git a/MdePkg/Library/BaseLib/BaseLib.inf b/MdePkg/Library/BaseLib/BaseLib.inf
index 03c7b02e82..5338938944 100644
--- a/MdePkg/Library/BaseLib/BaseLib.inf
+++ b/MdePkg/Library/BaseLib/BaseLib.inf
@@ -400,7 +400,7 @@
RiscV64/RiscVCpuBreakpoint.S | GCC
RiscV64/RiscVCpuPause.S | GCC
RiscV64/RiscVInterrupt.S | GCC
- RiscV64/FlushCache.S | GCC
+ RiscV64/RiscVCacheMgmt.S | GCC
RiscV64/CpuScratch.S | GCC
RiscV64/ReadTimer.S | GCC
RiscV64/RiscVMmu.S | GCC