Support config option to disable APM BIOS calls.
authorKevin O'Connor <kevin@koconnor.net>
Mon, 26 May 2008 19:19:33 +0000 (15:19 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Mon, 26 May 2008 19:19:33 +0000 (15:19 -0400)
New option CONFIG_APMBIOS can be used to disable apm.

src/apm.c
src/config.h

index 4a0f8036cec7c2b915317cbb5e5b064603d165a3..2abf504a83ea7d2499b91f106c74fb278d2398cf 100644 (file)
--- a/src/apm.c
+++ b/src/apm.c
@@ -183,6 +183,11 @@ handle_1553XX(struct bregs *regs)
 void VISIBLE16
 handle_1553(struct bregs *regs)
 {
+    if (! CONFIG_APMBIOS) {
+        set_code_fail(regs, RET_EUNSUPPORTED);
+        return;
+    }
+
     //debug_stub(regs);
     switch (regs->al) {
     case 0x00: handle_155300(regs); break;
index ed5d80912b507c0ee6777a2b40547f21c580d0c0..0f94c6f020a09b7ec6663c941e2c4d6a7331cbcc 100644 (file)
@@ -32,6 +32,8 @@
 #define CONFIG_PIRTABLE 1
 // Support int 1a/b1 PCI BIOS calls
 #define CONFIG_PCIBIOS 1
+// Support int 15/53 APM BIOS calls
+#define CONFIG_APMBIOS 1
 
 /* define it if the (emulated) hardware supports SMM mode */
 #define CONFIG_USE_SMM 1