summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MdePkg/Library/BaseLib/CpuDeadLoop.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/MdePkg/Library/BaseLib/CpuDeadLoop.c b/MdePkg/Library/BaseLib/CpuDeadLoop.c
index b3b7548..01e7b4d 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.<BR>
+ Copyright (c) 2006 - 2024, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -9,6 +9,8 @@
#include <Base.h>
#include <Library/BaseLib.h>
+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 ();
}
}