MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
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
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#100744): https://edk2.groups.io/g/devel/message/100744
Mute This Topic: https://groups.io/mt/97429987/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
On Mon, Mar 06, 2023 at 09:10:58AM -0800, Tuan Phan wrote:
> 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__));
Hi Tuan,
Please run uncrustify and fix the error at this line.
Thanks,
Sunil
> + InvalidateInstructionCache ();
> return Address;
> }
>
> --
> 2.25.1
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#100984): https://edk2.groups.io/g/devel/message/100984
Mute This Topic: https://groups.io/mt/97429987/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
When the range instruction cache invalidating not supported, the whole
instruction cache should be invalidated instead.
Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
---
V2:
- Format with uncrustify.
MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c b/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c
index 67a3387ff3c6..09de53fb5687 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;
}
--
2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#101036): https://edk2.groups.io/g/devel/message/101036
Mute This Topic: https://groups.io/mt/97530656/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
On Fri, Mar 10, 2023 at 01:50:19PM -0800, Tuan Phan wrote: > When the range instruction cache invalidating not supported, the whole > instruction cache should be invalidated instead. > > Signed-off-by: Tuan Phan <tphan@ventanamicro.com> > --- > V2: > - Format with uncrustify. > Reviewed-by: Sunil V L <sunilvl@ventanamicro.com> -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#101193): https://edk2.groups.io/g/devel/message/101193 Mute This Topic: https://groups.io/mt/97530656/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2026 Red Hat, Inc.