Apparently using APM opcode 07h to do a system shutdown only works if you
kick the APM BIOS into v1.1 or better mode. The attached patch does this,
correctly shutting an APM 1.1 or 1.2-compliant system down as intended.
Please test this patch, and let me know if it doesn't work for anyone.

Derrik Pates      |   Sysadmin, Douglas School   |    #linuxOS on EFnet
[EMAIL PROTECTED] |     District (dsdk12.net)    |    #linuxOS on OPN
--- orig/grub-0.90/stage2/asm.S Tue Feb 27 05:59:00 2001
+++ grub-0.90/stage2/asm.S      Thu Aug  2 00:25:42 2001
@@ -260,12 +260,19 @@
        xorw    %bx, %bx
        int     $0x15
 
-       /* connect APM (Is this really necessary?) */
+       /* connect APM */
        movw    $0x5301, %ax
        xorw    %bx, %bx
        int     $0x15
        jc      EXT_C(hard_stop)
 
+       /* set APM protocol level - 1.1 or bust. (this covers APM 1.2 also) */
+       movw    $0x530E, %ax
+       xorw    %bx, %bx
+       movw    $0x101, %cx
+       int     $0x15
+       jc      EXT_C(hard_stop)
+       
        /* set the power state to off */
        movw    $0x5307, %ax
        movw    $1, %bx

Reply via email to