ia64/xen-unstable

changeset 9328:e3c7b1e97459

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@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Sun Mar 19 12:41:28 2006 +0100 (2006-03-19)
parents 8cc027def1de
children 5b56d1e1ac8b
files tools/firmware/rombios/apmbios.S tools/firmware/rombios/rombios.c
line diff
     1.1 --- a/tools/firmware/rombios/apmbios.S	Sat Mar 18 16:30:20 2006 +0000
     1.2 +++ b/tools/firmware/rombios/apmbios.S	Sun Mar 19 12:41:28 2006 +0100
     1.3 @@ -217,14 +217,22 @@ APMSYM(03):
     1.4  ; APM interface disconnect
     1.5  APMSYM(04):
     1.6    cmp al, #0x04
     1.7 +  jne APMSYM(05)
     1.8 +  jmp APMSYM(ok)
     1.9 +
    1.10 +;-----------------
    1.11 +; APM cpu idle
    1.12 +APMSYM(05):
    1.13 +  cmp al, #0x05
    1.14    jne APMSYM(07)
    1.15 +  hlt
    1.16    jmp APMSYM(ok)
    1.17  
    1.18  ;-----------------
    1.19  ; APM Set Power State
    1.20  APMSYM(07):
    1.21    cmp al, #0x07
    1.22 -  jne APMSYM(0a)
    1.23 +  jne APMSYM(08)
    1.24    
    1.25    cmp bx, #1
    1.26    jne APMSYM(ok)
    1.27 @@ -268,6 +276,14 @@ APMSYM(07_standby):
    1.28    jmp APMSYM(ok)
    1.29  
    1.30  ;-----------------
    1.31 +; APM Enable / Disable
    1.32 +APMSYM(08):
    1.33 +  cmp al, #0x08
    1.34 +  jne APMSYM(0a)
    1.35 +
    1.36 +  jmp APMSYM(ok)
    1.37 +
    1.38 +;-----------------
    1.39  ; Get Power Status
    1.40  APMSYM(0a):
    1.41    cmp al, #0x0a
    1.42 @@ -297,7 +313,7 @@ APMSYM(0b):
    1.43  ; APM Driver Version
    1.44  APMSYM(0e):
    1.45    cmp al, #0x0e
    1.46 -  jne APMSYM(unimplemented)
    1.47 +  jne APMSYM(0f)
    1.48    
    1.49    mov ah, #1
    1.50    mov al, #2
    1.51 @@ -305,6 +321,25 @@ APMSYM(0e):
    1.52    jmp APMSYM(ok)
    1.53  
    1.54  ;-----------------
    1.55 +; APM Engage / Disengage
    1.56 +APMSYM(0f):
    1.57 +  cmp al, #0x0f
    1.58 +  jne APMSYM(10)
    1.59 +
    1.60 +  jmp APMSYM(ok)
    1.61 +
    1.62 +;-----------------
    1.63 +; APM Get Capabilities
    1.64 +APMSYM(10):
    1.65 +  cmp al, #0x10
    1.66 +  jne APMSYM(unimplemented)
    1.67 +
    1.68 +  mov bl, #0
    1.69 +  mov cx, #0
    1.70 +
    1.71 +  jmp APMSYM(ok)
    1.72 +
    1.73 +;-----------------
    1.74  APMSYM(ok):
    1.75    popf
    1.76    clc
     2.1 --- a/tools/firmware/rombios/rombios.c	Sat Mar 18 16:30:20 2006 +0000
     2.2 +++ b/tools/firmware/rombios/rombios.c	Sun Mar 19 12:41:28 2006 +0100
     2.3 @@ -149,7 +149,7 @@
     2.4  #define BX_SUPPORT_FLOPPY 1
     2.5  #define BX_FLOPPY_ON_CNT 37   /* 2 seconds */
     2.6  #define BX_PCIBIOS       1
     2.7 -#define BX_APM           0
     2.8 +#define BX_APM           1
     2.9  
    2.10  #define BX_USE_ATADRV    1
    2.11  #define BX_ELTORITO_BOOT 1