audk/MdePkg/Include/Library
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
..
ArmTrngLib.h MdePkg/ArmTrngLib: Definition for Arm TRNG library class interface 2022-11-06 16:32:28 +00:00
BaseLib.h MdePkg: Implement RISC-V Cache Management Operations 2023-12-19 12:48:14 +00:00
BaseMemoryLib.h MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseRiscVSbiLib.h MdePkg: BaseRiscVSbiLib: make more useful to consumers 2023-05-17 23:47:20 +00:00
CacheMaintenanceLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CcProbeLib.h MdePkg: Add CcProbeLibNull 2022-04-19 01:26:08 +00:00
CpuLib.h MdePkg: Move API and implementation from UefiCpuLib to CpuLib 2023-03-10 08:23:56 +00:00
DebugLib.h MdePkg: Improve wording of manageability debug level comment 2023-12-11 17:07:03 +00:00
DebugPrintErrorLevelLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DevicePathLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeCoreEntryPoint.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeServicesLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeServicesTableLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ExtractGuidedSectionLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
FdtLib.h UefiPayloadPkg: Add FIT support 2023-09-26 07:26:21 +00:00
FileHandleLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
HobLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
HstiLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
IoLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
JedecJep106Lib.h MdePkg: Add new JedecJep106Lib to fetch JEDEC JEP106 manufacturer 2023-04-12 14:29:54 +00:00
MemoryAllocationLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
MipiSysTLib.h MdePkg: Add MipiSysTLib library 2023-05-11 07:26:38 +00:00
MmServicesTableLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
MmUnblockMemoryLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
OrderedCollectionLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PcdLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PciCf8Lib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PciExpressLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PciLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PciSegmentInfoLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PciSegmentLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeCoffExtraActionLib.h MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeCoffGetEntryPointLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeCoffLib.h MdePkg/PeCoffLib: Capture DLL characteristics fields in image context 2023-04-07 13:18:38 +00:00
PeiCoreEntryPoint.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeiServicesLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeiServicesTablePointerLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeimEntryPoint.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PerformanceLib.h MdePkg: Update code to be more C11 compliant by using __func__ 2023-03-17 17:55:48 +00:00
PostCodeLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PrintLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
RegisterFilterLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReportStatusCodeLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ResourcePublicationLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
RngLib.h MdePkg/Rng: Add GetRngGuid() to RngLib 2023-09-08 09:48:55 +00:00
S3BootScriptLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
S3IoLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
S3PciLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
S3PciSegmentLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
S3SmbusLib.h MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
S3StallLib.h MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SafeIntLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SerialPortLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmbusLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmiHandlerProfileLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmCpuRendezvousLib.h MdePkg: add SmmCpuRendezvousLib.h and SmmCpuRendezvousLibNull implement. 2022-05-09 02:04:11 +00:00
SmmIoLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmMemLib.h MdePkg/Library/Smm: Fix various typos 2020-02-10 22:30:07 +00:00
SmmPeriodicSmiLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmServicesTableLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
StandaloneMmDriverEntryPoint.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SynchronizationLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
TdxLib.h MdePkg: Add TdxLib to wrap Tdx operations 2022-04-02 08:15:12 +00:00
TimerLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
TraceHubDebugSysTLib.h MdePkg: Add NULL library of TraceHubDebugSysTLib 2023-05-11 07:26:38 +00:00
UefiApplicationEntryPoint.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiBootServicesTableLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiDecompressLib.h MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiDriverEntryPoint.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiRuntimeLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiRuntimeServicesTableLib.h MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiScsiLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiUsbLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UnitTestLib.h MdePkg: Update code to be more C11 compliant by using __func__ 2023-03-17 17:55:48 +00:00