iPXE
nap.h
Go to the documentation of this file.
1#ifndef _BITS_NAP_H
2#define _BITS_NAP_H
3
4/** @file
5 *
6 * x86-specific CPU sleeping API implementations
7 *
8 */
9
10FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11FILE_SECBOOT ( PERMITTED );
12
13#include <ipxe/bios_nap.h>
14
15/**
16 * Sleep until next CPU interrupt
17 *
18 */
19static inline __attribute__ (( always_inline )) void cpu_halt ( void ) {
20 __asm__ __volatile__ ( "hlt" );
21}
22
23#endif /* _BITS_NAP_H */
__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))
BIOS CPU sleeping.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
#define __attribute__(x)
Definition compiler.h:10
void cpu_halt(void)
Sleep until next CPU interrupt.
__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")