]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/BdsLib: Fixed cache cleaning in PreparePlatformHardware()
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 4 Jul 2012 20:24:25 +0000 (20:24 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 4 Jul 2012 20:24:25 +0000 (20:24 +0000)
Because the D&I caches were clean before to be disabled, the cache
lines might have got dirty during the cache maintenance operations.
This fix disables D&I caches before to clean them. The performance
drops should be minimised as invalidating the I cache is only a
couple of instruction.

Signed-off-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13503 6f19259b-4bc3-4df7-8a09-765794883524

ArmPkg/Library/BdsLib/BdsLinuxLoader.c

index 6cd49a2fca825a0c930020979a66a4e5d903602f..5ef3c1cb8d0373563484ac5c7b2a92b4f8cdd971 100644 (file)
@@ -25,12 +25,12 @@ PreparePlatformHardware (
   //Note: Interrupts will be disabled by the GIC driver when ExitBootServices() will be called.
 
   // Clean, invalidate, disable data cache
-  ArmCleanInvalidateDataCache();
   ArmDisableDataCache();
+  ArmCleanInvalidateDataCache();
 
   // Invalidate and disable the Instruction cache
-  ArmInvalidateInstructionCache ();
   ArmDisableInstructionCache ();
+  ArmInvalidateInstructionCache ();
 
   // Turn off MMU
   ArmDisableMmu();