public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v4 0/1] MdePkg:Implement RISCV CMO
@ 2023-07-13  9:33 Dhaval Sharma
  2023-07-13  9:33 ` [PATCH v4 1/1] " Dhaval Sharma
  0 siblings, 1 reply; 4+ messages in thread
From: Dhaval Sharma @ 2023-07-13  9:33 UTC (permalink / raw)
  To: devel

Implementing code to support Cache Management Operations (CMO) defined by RV spec https://github.com/riscv/riscv-CMOs

Notes:

CMO only supports block based Operations. Meaning complete cache flush/invd/clean Operations are not available. In that case we fallback on fence.i instructions.
Rely on the fact that platform init has initialized CMO and this implementation just checks if it is enabled.
In order to avoid compiler dependency injecting byte code.
Test:

Ensured correct instructions are refelecting in asm
Able to boot platform with RiscVVirtQemu config
Not able to verify actual instruction in HW as Qemu ignores any actual cache operations.

Dhaval Sharma (1):
  MdePkg:Implement RISCV CMO

 MdePkg/Library/BaseLib/BaseLib.inf                  |   2 +-
 MdePkg/Include/Register/RiscV64/RiscVEncoding.h     |   4 +
 MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c | 200 ++++++++++++++++++--
 MdePkg/Library/BaseLib/RiscV64/FlushCache.S         |  21 --
 MdePkg/Library/BaseLib/RiscV64/RiscVCacheMgmt.S     |  64 +++++++
 5 files changed, 254 insertions(+), 37 deletions(-)
 delete mode 100644 MdePkg/Library/BaseLib/RiscV64/FlushCache.S
 create mode 100644 MdePkg/Library/BaseLib/RiscV64/RiscVCacheMgmt.S

-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-27  5:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-13  9:33 [PATCH v4 0/1] MdePkg:Implement RISCV CMO Dhaval Sharma
2023-07-13  9:33 ` [PATCH v4 1/1] " Dhaval Sharma
2023-07-24  4:33   ` [edk2-devel] " Sunil V L
2023-07-27  5:47     ` Dhaval Sharma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox