iPXE
Functions
efix86_nap.c File Reference

iPXE CPU sleeping API for EFI More...

#include <ipxe/nap.h>
#include <ipxe/efi/efi.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
static void efix86_cpu_nap (void)
 Sleep until next interrupt.
 PROVIDE_NAP (efix86, cpu_nap, efix86_cpu_nap)

Detailed Description

iPXE CPU sleeping API for EFI

Definition in file efix86_nap.c.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
static void efix86_cpu_nap ( void  ) [static]

Sleep until next interrupt.

Definition at line 39 of file efix86_nap.c.

References __asm__().

                                    {
        /*
         * I can't find any EFI API that allows us to put the CPU to
         * sleep.  The CpuSleep() function is defined in CpuLib.h, but
         * isn't part of any exposed protocol so we have no way to
         * call it.
         *
         * The EFI shell doesn't seem to bother sleeping the CPU; it
         * just sits there idly burning power.
         *
         */
        __asm__ __volatile__ ( "hlt" );
}
PROVIDE_NAP ( efix86  ,
cpu_nap  ,
efix86_cpu_nap   
)