Home | History | Annotate | Download | only in BaseLib
      1 /** @file
      2   Base Library CPU Functions for all architectures.
      3 
      4   Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
      5   This program and the accompanying materials
      6   are licensed and made available under the terms and conditions of the BSD License
      7   which accompanies this distribution.  The full text of the license may be found at
      8   http://opensource.org/licenses/bsd-license.php.
      9 
     10   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     11   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     12 
     13 **/
     14 
     15 
     16 
     17 #include <Base.h>
     18 #include <Library/BaseLib.h>
     19 
     20 /**
     21   Executes an infinite loop.
     22 
     23   Forces the CPU to execute an infinite loop. A debugger may be used to skip
     24   past the loop and the code that follows the loop must execute properly. This
     25   implies that the infinite loop must not cause the code that follow it to be
     26   optimized away.
     27 
     28 **/
     29 VOID
     30 EFIAPI
     31 CpuDeadLoop (
     32   VOID
     33   )
     34 {
     35   volatile UINTN  Index;
     36 
     37   for (Index = 0; Index == 0;);
     38 }
     39