MdePkg/BaseLib: Add SpeculationBarrier implementation for RiscV64 #4480
+35
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement the SpeculationBarrier with implementations consisting of fence instruction which provides finer-grain memory orderings. Perform Data Barrier in RiscV: fence rw,rw
Perform Instruction Barrier in RiscV: fence.i; fence r,r More detail is in Appendix A: RVWMO Explanatory Material in https://github.com/riscv/riscv-isa-manual
This API is first introduced in the below commits for IA32 and x64 d9f1cac e83d841 and below the commit for ARM and AArch64 implementation c0959b4
This commit is to add the RiscV64 implementation which will be used by variable service under Variable/RuntimeDxe
Cc: Andrei Warkentin andrei.warkentin@intel.com
Cc: Evan Chai evan.chai@intel.com
Cc: Sunil V L sunilvl@ventanamicro.com
Cc: Tuan Phan tphan@ventanamicro.com
Signed-off-by: Yong Li yong.li@intel.com
Reviewed-by: Sunil V L sunilvl@ventanamicro.com