From: "Dhaval Sharma" <dhaval@rivosinc.com>
To: devel@edk2.groups.io
Subject: [PATCH v4 0/1] MdePkg:Implement RISCV CMO
Date: Thu, 13 Jul 2023 15:03:30 +0530 [thread overview]
Message-ID: <20230713093331.267164-1-dhaval@rivosinc.com> (raw)
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
next reply other threads:[~2023-07-13 9:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-13 9:33 Dhaval Sharma [this message]
2023-07-13 9:33 ` [PATCH v4 1/1] MdePkg:Implement RISCV CMO Dhaval Sharma
2023-07-24 4:33 ` [edk2-devel] " Sunil V L
2023-07-27 5:47 ` Dhaval Sharma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230713093331.267164-1-dhaval@rivosinc.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox