public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdePkg/BaseCacheMaintenanceLib: RISC-V: Fix instruction cache not been invalidated
@ 2023-03-06 17:10 Tuan Phan
  2023-03-10  5:59 ` Sunil V L
  0 siblings, 1 reply; 4+ messages in thread
From: Tuan Phan @ 2023-03-06 17:10 UTC (permalink / raw)
  To: devel; +Cc: michael.d.kinney, gaoliming, zhiguang.liu, sunilvl, git,
	Tuan Phan

When the range instruction cache invalidating not supported, the whole
instruction cache should be invalidated instead.

Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
---
 MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c b/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c
index 67a3387ff3c6..a744b2a6f889 100644
--- a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c
+++ b/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c
@@ -76,7 +76,10 @@ InvalidateInstructionCacheRange (
   IN UINTN  Length
   )
 {
-  DEBUG ((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", __FUNCTION__));
+  DEBUG ((DEBUG_WARN,
+      "%a:RISC-V unsupported function.\n"
+      "Invalidating the whole instruction cache instead.\n", __func__));
+  InvalidateInstructionCache ();
   return Address;
 }
 
-- 
2.25.1


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

end of thread, other threads:[~2023-03-15  5:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-06 17:10 [PATCH] MdePkg/BaseCacheMaintenanceLib: RISC-V: Fix instruction cache not been invalidated Tuan Phan
2023-03-10  5:59 ` Sunil V L
2023-03-10 21:50   ` [PATCH v2] " Tuan Phan
2023-03-15  5:21     ` Sunil V L

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