Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MdePkg/BaseLib: Add SpeculationBarrier implementation for RiscV64 #4480

Merged
merged 2 commits into from
Jun 6, 2023

Conversation

yli147
Copy link
Contributor

@yli147 yli147 commented Jun 5, 2023

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

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
tianocore@d9f1cac
tianocore@e83d841
and below the commit for ARM and AArch64 implementation
tianocore@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>
@mdkinney mdkinney added the push Auto push patch series in PR if all checks pass label Jun 6, 2023
@mergify mergify bot merged commit ded0b48 into tianocore:master Jun 6, 2023
124 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
push Auto push patch series in PR if all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants