[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Add back hvm guest apm support and fixed the original apm issues to



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID e3c7b1e974597596c842837fddba3658ee13670b
# Parent  8cc027def1de9454aac777834a0bd3c00d1e50fc
Add back hvm guest apm support and fixed the original apm issues to
make "halt -p" and "shutdown -h now" work. Also added apm 0x05 CPU
idle, 0x08 Enable PM and 0x0f apm engage/disengage subfunctions.

Signed-off-by: Winston Wang <winston.l.wang@xxxxxxxxx>

diff -r 8cc027def1de -r e3c7b1e97459 tools/firmware/rombios/apmbios.S
--- a/tools/firmware/rombios/apmbios.S  Sat Mar 18 16:30:20 2006
+++ b/tools/firmware/rombios/apmbios.S  Sun Mar 19 11:41:28 2006
@@ -217,14 +217,22 @@
 ; APM interface disconnect
 APMSYM(04):
   cmp al, #0x04
+  jne APMSYM(05)
+  jmp APMSYM(ok)
+
+;-----------------
+; APM cpu idle
+APMSYM(05):
+  cmp al, #0x05
   jne APMSYM(07)
+  hlt
   jmp APMSYM(ok)
 
 ;-----------------
 ; APM Set Power State
 APMSYM(07):
   cmp al, #0x07
-  jne APMSYM(0a)
+  jne APMSYM(08)
   
   cmp bx, #1
   jne APMSYM(ok)
@@ -265,6 +273,14 @@
   mov ax, #APMSYM(07_standby_str)
   call APMSYM(out_str)
   pop edx
+  jmp APMSYM(ok)
+
+;-----------------
+; APM Enable / Disable
+APMSYM(08):
+  cmp al, #0x08
+  jne APMSYM(0a)
+
   jmp APMSYM(ok)
 
 ;-----------------
@@ -297,11 +313,30 @@
 ; APM Driver Version
 APMSYM(0e):
   cmp al, #0x0e
-  jne APMSYM(unimplemented)
+  jne APMSYM(0f)
   
   mov ah, #1
   mov al, #2
   
+  jmp APMSYM(ok)
+
+;-----------------
+; APM Engage / Disengage
+APMSYM(0f):
+  cmp al, #0x0f
+  jne APMSYM(10)
+
+  jmp APMSYM(ok)
+
+;-----------------
+; APM Get Capabilities
+APMSYM(10):
+  cmp al, #0x10
+  jne APMSYM(unimplemented)
+
+  mov bl, #0
+  mov cx, #0
+
   jmp APMSYM(ok)
 
 ;-----------------
diff -r 8cc027def1de -r e3c7b1e97459 tools/firmware/rombios/rombios.c
--- a/tools/firmware/rombios/rombios.c  Sat Mar 18 16:30:20 2006
+++ b/tools/firmware/rombios/rombios.c  Sun Mar 19 11:41:28 2006
@@ -149,7 +149,7 @@
 #define BX_SUPPORT_FLOPPY 1
 #define BX_FLOPPY_ON_CNT 37   /* 2 seconds */
 #define BX_PCIBIOS       1
-#define BX_APM           0
+#define BX_APM           1
 
 #define BX_USE_ATADRV    1
 #define BX_ELTORITO_BOOT 1

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.