diff --git a/MdeModulePkg/Core/Dxe/Misc/Stall.c b/MdeModulePkg/Core/Dxe/Misc/Stall.c index 997942fa54..5bc7814f09 100644 --- a/MdeModulePkg/Core/Dxe/Misc/Stall.c +++ b/MdeModulePkg/Core/Dxe/Misc/Stall.c @@ -32,7 +32,7 @@ CoreInternalWaitForTick ( IN UINT64 Counter ) { - while (Counter > 0xffffffff) { + while ((Counter & 0xffffffff00000000ULL) != 0) { gMetronome->WaitForTick (gMetronome, 0xffffffff); Counter -= 0xffffffff; }