**/\r
\r
#include <Library/BaseLib.h>\r
+#include <Library/CacheMaintenanceLib.h>\r
#include <Library/DebugAgentLib.h>\r
#include <Library/ArmLib.h>\r
\r
{\r
// Data Cache enabled on Primary core when MMU is enabled.\r
ArmDisableDataCache ();\r
- // Invalidate Data cache\r
- ArmInvalidateDataCache ();\r
// Invalidate instruction cache\r
ArmInvalidateInstructionCache ();\r
// Enable Instruction Caches on all cores.\r
ArmEnableInstructionCache ();\r
\r
+ InvalidateDataCacheRange ((VOID *)(UINTN)PcdGet64 (PcdCPUCoresStackBase),\r
+ PcdGet32 (PcdCPUCorePrimaryStackSize));\r
+\r
//\r
// Note: Doesn't have to Enable CPU interface in non-secure world,\r
// as Non-secure interface is already enabled in Secure world.\r