iPXE
bios_nap.c
Go to the documentation of this file.
1 #include <ipxe/nap.h>
2 #include <realmode.h>
3 
4 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
5 
6 /**
7  * Save power by halting the CPU until the next interrupt
8  *
9  */
10 static void bios_cpu_nap ( void ) {
11  __asm__ __volatile__ ( "sti\n\t"
12  "hlt\n\t"
13  "cli\n\t" );
14 }
15 
16 PROVIDE_NAP ( pcbios, cpu_nap, bios_cpu_nap );
CPU sleeping.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
static void bios_cpu_nap(void)
Save power by halting the CPU until the next interrupt.
Definition: bios_nap.c:10
__asm__ __volatile__("\n1:\n\t" "movb -1(%3,%1), %%al\n\t" "stosb\n\t" "loop 1b\n\t" "xorl %%eax, %%eax\n\t" "mov %4, %1\n\t" "rep stosb\n\t" :"=&D"(discard_D), "=&c"(discard_c), "+m"(*value) :"r"(data), "g"(pad_len), "0"(value0), "1"(len) :"eax")
__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")
void cpu_nap(void)
Sleep until next CPU interrupt.
PROVIDE_NAP(pcbios, cpu_nap, bios_cpu_nap)