set_success(regs);
}
+// APM cpu busy
+static void
+handle_155306(struct bregs *regs)
+{
+ set_success(regs);
+}
+
// APM Set Power State
static void
handle_155307(struct bregs *regs)
set_success(regs);
}
+#define RET_ENOEVENT 0x80
+
// Get PM Event
static void
handle_15530b(struct bregs *regs)
{
- set_fail(regs);
- regs->ah = 0x80; // no event pending
+ set_code_fail_silent(regs, RET_ENOEVENT);
}
// APM Driver Version
case 0x03: handle_155303(regs); break;
case 0x04: handle_155304(regs); break;
case 0x05: handle_155305(regs); break;
+ case 0x06: handle_155306(regs); break;
case 0x07: handle_155307(regs); break;
case 0x08: handle_155308(regs); break;
case 0x0a: handle_15530a(regs); break;
pushw %ds
movw %ss, %ax // Move %ss to %ds
movw %ax, %ds
- pushl %esp // Backup %esp, then clear high bits
- movzwl %sp, %esp
calll \cfunc
- popl %esp // Restore %esp (including high bits)
popw %ds // Restore registers saved above
popw %es
popl %edx
pushw %ds
movw %ss, %ax // Move %ss to %ds
movw %ax, %ds
- movl %esp, %ebx // Backup %esp, then zero high bits
- movzwl %sp, %esp
movl %esp, %eax // First arg is pointer to struct bregs
calll \cfunc
- movl %ebx, %esp // Restore %esp (including high bits)
popw %ds // Restore registers (from struct bregs)
popw %es
popl %edi
pushfw // save flags
pushl %eax // dummy
ENTRY_ARG handle_1553
- addw $4, %sp // pop dummy
+ addl $4, %esp // pop dummy
popfw // restore flags
lretw
pushfw
pushw %cs // Setup for long jump to 16bit mode
pushw $1f
- incw 2(%esp)
+ addw $8, 2(%esp)
ljmpw *(%esp)
.code16gcc
1:
ENTRY_ARG handle_1553
movw $2f,(%esp) // Setup for long jump back to 32bit mode
- decw 2(%esp)
+ subw $8, 2(%esp)
ljmpw *(%esp)
.code32
2: