X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=ArmPkg%2FLibrary%2FBdsLib%2FArm%2FBdsLinuxLoader.c;h=3d512486da415f5d2d19edb6cbb00e94a48e6a14;hp=d85547b589807f04645a7829eca26cb439cfebb1;hb=5779aaafe95e5cf8d9f1b192725bba60c4b9e245;hpb=f4b491b56f827052d0823c3217fa2049fd479a7d diff --git a/ArmPkg/Library/BdsLib/Arm/BdsLinuxLoader.c b/ArmPkg/Library/BdsLib/Arm/BdsLinuxLoader.c index d85547b589..3d512486da 100644 --- a/ArmPkg/Library/BdsLib/Arm/BdsLinuxLoader.c +++ b/ArmPkg/Library/BdsLib/Arm/BdsLinuxLoader.c @@ -25,9 +25,11 @@ PreparePlatformHardware ( { //Note: Interrupts will be disabled by the GIC driver when ExitBootServices() will be called. - // Clean, invalidate, disable data cache - ArmDisableDataCache(); - ArmCleanInvalidateDataCache(); + // Clean before Disable else the Stack gets corrupted with old data. + ArmCleanDataCache (); + ArmDisableDataCache (); + // Invalidate all the entries that might have snuck in. + ArmInvalidateDataCache (); // Invalidate and disable the Instruction cache ArmDisableInstructionCache ();