audk/MdePkg/Include
Dhaval 26727c2ae2 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@...>
2023-12-19 12:48:14 +00:00
..
AArch64 MdePkg/ProcessorBind AARCH64: Add asm macro to emit GNU BTI note 2023-03-30 11:05:22 +00:00
Arm MdePkg: Remove RVCT support 2022-05-13 14:58:54 +00:00
Ebc MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Guid MdePkg: Update MemoryAttributesTable to v2.10 2023-03-30 11:05:22 +00:00
Ia32 MdePkg: Remove VS2008-VS2013 remnants 2023-05-05 11:41:35 +00:00
IndustryStandard MdePkg:Add NVME Sanitize command support to Nvme.h 2023-12-05 20:27:27 +00:00
Library MdePkg: Implement RISC-V Cache Management Operations 2023-12-19 12:48:14 +00:00
LoongArch64 MdePkg: Fix UINT64 and INT64 word length for LoongArch64 2023-02-01 02:12:41 +00:00
Pi MdePkg: PiStatusCode: Add TPM subclass definition to MdePkg 2023-06-23 16:28:24 +00:00
Ppi MdePkg/Include/Ppi: Remove Itanium leftover data structure 2023-03-26 02:03:50 +00:00
Protocol RedfishPkg/RedfishRestExDxe: return HTTP status code to caller. 2023-09-19 15:41:18 +00:00
Register MdePkg/Register: RISC-V: Add satp mode bits shift definition 2023-07-15 14:10:18 +00:00
RiscV64 MdePkg: Implement RISC-V Cache Management Operations 2023-12-19 12:48:14 +00:00
Uefi MdePkg: Add UEFI v2.10 ISA memory type definition 2023-12-09 01:50:07 +00:00
X64 MdePkg: don't set visibility to hidden 2023-06-01 10:53:35 +00:00
Base.h MdePkg: Add missing status codes 2023-08-07 22:56:02 +00:00
ConfidentialComputingGuestAttr.h MdePkg: Add CC_GUEST_TYPE in ConfidentialComputingGuestAttr.h 2022-04-19 01:26:08 +00:00
PiDxe.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PiMm.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PiPei.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PiSmm.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Uefi.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00