iPXE
Functions
efi_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 efi_cpu_nap (void)
 Sleep until next interrupt. More...
 
 PROVIDE_NAP (efi, cpu_nap, efi_cpu_nap)
 

Detailed Description

iPXE CPU sleeping API for EFI

Definition in file efi_nap.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ efi_cpu_nap()

static void efi_cpu_nap ( void  )
static

Sleep until next interrupt.

Definition at line 39 of file efi_nap.c.

39  {
40  /*
41  * I can't find any EFI API that allows us to put the CPU to
42  * sleep. The CpuSleep() function is defined in CpuLib.h, but
43  * isn't part of any exposed protocol so we have no way to
44  * call it.
45  *
46  * The EFI shell doesn't seem to bother sleeping the CPU; it
47  * just sits there idly burning power.
48  *
49  * If a shutdown is in progess, there may be nothing to
50  * generate an interrupt since the timer is disabled in the
51  * first step of ExitBootServices().
52  */
54  cpu_halt();
55 }
void cpu_halt(void)
Sleep until next CPU interrupt.
int efi_shutdown_in_progress
EFI shutdown is in progress.
Definition: efi_init.c:58

References cpu_halt(), and efi_shutdown_in_progress.

◆ PROVIDE_NAP()

PROVIDE_NAP ( efi  ,
cpu_nap  ,
efi_cpu_nap   
)