This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
2010-04-19 21:16:01 +02:00
|
|
|
#include <ipxe/nap.h>
|
2008-10-13 00:34:45 +02:00
|
|
|
#include <realmode.h>
|
|
|
|
|
2015-03-02 12:54:40 +01:00
|
|
|
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
2009-05-01 16:41:06 +02:00
|
|
|
|
2008-10-13 00:34:45 +02:00
|
|
|
/**
|
|
|
|
* Save power by halting the CPU until the next interrupt
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
static void bios_cpu_nap ( void ) {
|
2014-04-29 19:17:17 +02:00
|
|
|
__asm__ __volatile__ ( "sti\n\t"
|
|
|
|
"hlt\n\t"
|
|
|
|
"cli\n\t" );
|
2008-10-13 00:34:45 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PROVIDE_NAP ( pcbios, cpu_nap, bios_cpu_nap );
|