iPXE
nap.h File Reference

x86-specific CPU sleeping API implementations More...

#include <ipxe/bios_nap.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 FILE_SECBOOT (PERMITTED)
static __attribute__ ((always_inline)) void cpu_halt(void)
 Sleep until next CPU interrupt.

Detailed Description

x86-specific CPU sleeping API implementations

Definition in file nap.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

◆ __attribute__()

__attribute__ ( (always_inline) )
inlinestatic

Sleep until next CPU interrupt.

Definition at line 19 of file nap.h.

19 {
20 __asm__ __volatile__ ( "hlt" );
21}
__asm__ __volatile__("call *%9" :"=a"(result), "=c"(discard_ecx), "=d"(discard_edx) :"d"(0), "a"(code), "b"(0), "c"(in_phys), "D"(0), "S"(out_phys), "m"(hypercall))
__asm__(".section \".rodata\", \"a\", " PROGBITS "\n\t" "\nprivate_key_data:\n\t" ".size private_key_data, ( . - private_key_data )\n\t" ".equ private_key_len, ( . - private_key_data )\n\t" ".previous\n\t")

References __asm__(), and __volatile__().