51 :
"=a" ( apm_version ),
"=b" ( apm_signature ),
52 "=c" ( apm_flags ),
"=d" (
carry )
53 :
"a" ( 0x5300 ),
"b" ( 0x0000 ),
56 DBG (
"APM not present\n" );
59 if ( apm_signature != 0x504d ) {
60 DBG (
"APM not present\n" );
63 if ( apm_version < 0x0101 ) {
64 DBG (
"APM 1.1+ not supported\n" );
67 if ( ( apm_flags & 0x8 ) == 0x8 ) {
68 DBG (
"APM power management disabled\n" );
71 DBG2 (
"APM check completed\n" );
77 :
"a" ( 0x5301 ),
"b" ( 0x0000 ),
80 DBG (
"APM initialisation failed\n" );
83 DBG2 (
"APM initialisation completed\n" );
89 :
"a" ( 0x530e ),
"b" ( 0x0000 ),
90 "c" ( 0x0101 ),
"d" ( 0x0000 ) );
92 DBG (
"APM setting driver version failed\n" );
95 DBG2 (
"APM driver version set\n" );
101 :
"a" ( 0x5307 ),
"b" ( 0x0001 ),
102 "c" ( 0x0003 ),
"d" ( 0x0000) );
104 DBG (
"APM setting power state failed\n" );
#define ECANCELED
Operation canceled.
#define ENOTSUP
Operation not supported.
__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))
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
#define EPERM
Operation not permitted.
int apm_poweroff(void)
Power off the computer using APM.
__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")
#define ENOTTY
Inappropriate I/O control operation.
Advanced Power Management.
#define EIO
Input/output error.
#define DBG(...)
Print a debugging message.
#define REAL_CODE(asm_code_str)