diff --git a/MdePkg/Library/BaseLib/CpuDeadLoop.c b/MdePkg/Library/BaseLib/CpuDeadLoop.c index b3b7548fa5..01e7b4def7 100644 --- a/MdePkg/Library/BaseLib/CpuDeadLoop.c +++ b/MdePkg/Library/BaseLib/CpuDeadLoop.c @@ -1,7 +1,7 @@ /** @file Base Library CPU Functions for all architectures. - Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2024, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -9,6 +9,8 @@ #include #include +static volatile UINTN mDeadLoopComparator = 0; + /** Executes an infinite loop. @@ -26,7 +28,7 @@ CpuDeadLoop ( { volatile UINTN Index; - for (Index = 0; Index == 0;) { + for (Index = mDeadLoopComparator; Index == mDeadLoopComparator;) { CpuPause (); } }