mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg: Add cache operations support for Arch proto
With CMO operations available for RISC-V, utilize them in CPU Architecture protocol. Signed-off-by: Dhaval Sharma <dhaval@rivosinc.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Sunil VL <sunilvl@ventanamicro.com> Cc: Andrei Warkentin <andrei.warkentin@intel.com> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
This commit is contained in:
parent
cd6f215223
commit
141dcaed6c
|
@ -90,6 +90,20 @@ CpuFlushCpuDataCache (
|
|||
IN EFI_CPU_FLUSH_TYPE FlushType
|
||||
)
|
||||
{
|
||||
switch (FlushType) {
|
||||
case EfiCpuFlushTypeWriteBack:
|
||||
WriteBackDataCacheRange ((VOID *)(UINTN)Start, (UINTN)Length);
|
||||
break;
|
||||
case EfiCpuFlushTypeInvalidate:
|
||||
InvalidateDataCacheRange ((VOID *)(UINTN)Start, (UINTN)Length);
|
||||
break;
|
||||
case EfiCpuFlushTypeWriteBackInvalidate:
|
||||
WriteBackInvalidateDataCacheRange ((VOID *)(UINTN)Start, (UINTN)Length);
|
||||
break;
|
||||
default:
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <Library/BaseRiscVSbiLib.h>
|
||||
#include <Library/BaseRiscVMmuLib.h>
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Library/CacheMaintenanceLib.h>
|
||||
#include <Library/CpuExceptionHandlerLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
|
|
Loading…
Reference in New Issue