public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH v5 0/2] MdePkg:Implement RISCV CMO
@ 2023-10-17 12:17 Dhaval Sharma
  2023-10-17 12:17 ` [edk2-devel] [PATCH v5 1/2] " Dhaval Sharma
  2023-10-17 12:17 ` [edk2-devel] [PATCH v5 2/2] OvmfPkg/RiscVVirt: Override for RV CPU Features Dhaval Sharma
  0 siblings, 2 replies; 12+ messages in thread
From: Dhaval Sharma @ 2023-10-17 12:17 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. Code branch https://github.com/rivosinc/edk2/tree/dev_rv_cmo_v5

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 (2):
  MdePkg:Implement RISCV CMO
  OvmfPkg/RiscVVirt: Override for RV CPU Features

 MdePkg/MdePkg.dec                                                  |   7 +
 OvmfPkg/RiscVVirt/RiscVVirt.dsc.inc                                |   2 +
 MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf |   3 +-
 MdePkg/Library/BaseLib/BaseLib.inf                                 |   2 +-
 MdePkg/Include/Register/RiscV64/RiscVEncoding.h                    |   6 +
 MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c                | 203 +++++++++++++++++---
 MdePkg/Library/BaseLib/RiscV64/FlushCache.S                        |  21 --
 MdePkg/Library/BaseLib/RiscV64/RiscVCacheMgmt.S                    |  38 ++++
 8 files changed, 236 insertions(+), 46 deletions(-)
 delete mode 100644 MdePkg/Library/BaseLib/RiscV64/FlushCache.S
 create mode 100644 MdePkg/Library/BaseLib/RiscV64/RiscVCacheMgmt.S

-- 
2.39.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109677): https://edk2.groups.io/g/devel/message/109677
Mute This Topic: https://groups.io/mt/102016147/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



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

end of thread, other threads:[~2023-10-19 15:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-17 12:17 [edk2-devel] [PATCH v5 0/2] MdePkg:Implement RISCV CMO Dhaval Sharma
2023-10-17 12:17 ` [edk2-devel] [PATCH v5 1/2] " Dhaval Sharma
2023-10-17 14:22   ` Laszlo Ersek
2023-10-17 14:32     ` Laszlo Ersek
2023-10-17 12:17 ` [edk2-devel] [PATCH v5 2/2] OvmfPkg/RiscVVirt: Override for RV CPU Features Dhaval Sharma
2023-10-17 14:25   ` Laszlo Ersek
2023-10-17 14:39   ` Laszlo Ersek
2023-10-19  6:48     ` Dhaval Sharma
2023-10-19  9:22       ` Laszlo Ersek
2023-10-19 12:17         ` Laszlo Ersek
2023-10-19 14:37           ` Dhaval Sharma
2023-10-19 15:51             ` Laszlo Ersek

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