summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library
diff options
context:
space:
mode:
authorTuan Phan <tphan@ventanamicro.com>2023-03-10 13:50:19 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-03-16 15:47:40 +0000
commit997c6967b00cdd797fe787567a28a7565aafd301 (patch)
tree2758545c9e82ac3ad0610e0ad5900eafc3b12963 /MdePkg/Library
parent7cfe9048e3ecad7988d66ce1f0ec20d9aef509ee (diff)
downloadedk2-997c6967b00cdd797fe787567a28a7565aafd301.tar.gz
edk2-997c6967b00cdd797fe787567a28a7565aafd301.tar.bz2
edk2-997c6967b00cdd797fe787567a28a7565aafd301.zip
MdePkg/BaseCacheMaintenanceLib: RISC-V: Fix InvalidateInstructionCacheRange
When the range instruction cache invalidating not supported, the whole instruction cache should be invalidated instead. Signed-off-by: Tuan Phan <tphan@ventanamicro.com> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
Diffstat (limited to 'MdePkg/Library')
-rw-r--r--MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c b/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c
index 67a3387ff3..9a6d57d841 100644
--- a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c
+++ b/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c
@@ -76,7 +76,12 @@ 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;
}