WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] vgabios: Support VESA power management ex

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] vgabios: Support VESA power management extensions.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 21 May 2008 08:20:15 -0700
Delivery-date: Wed, 21 May 2008 08:20:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1211365181 -3600
# Node ID b58e95aee14f0190a95b2ae610c24c8fe09e8c7a
# Parent  70ca37d228951e98fdf2b5f9bd5883a04321c2c8
vgabios: Support VESA power management extensions.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/firmware/vgabios/clext.c     |   54 ++++++++++++++++++++++++++++++++++---
 tools/firmware/vgabios/vgatables.h |    1 
 2 files changed, 52 insertions(+), 3 deletions(-)

diff -r 70ca37d22895 -r b58e95aee14f tools/firmware/vgabios/clext.c
--- a/tools/firmware/vgabios/clext.c    Wed May 21 11:07:23 2008 +0100
+++ b/tools/firmware/vgabios/clext.c    Wed May 21 11:19:41 2008 +0100
@@ -26,6 +26,7 @@
 #define PM_BIOSMEM_CURRENT_MODE 0x449
 #define PM_BIOSMEM_CRTC_ADDRESS 0x463
 #define PM_BIOSMEM_VBE_MODE 0x4BA
+#define PM_BIOSMEM_VBE_POWER 0x4BC 
 
 typedef struct
 {
@@ -491,7 +492,7 @@ cirrus_vesa:
 #ifdef CIRRUS_DEBUG
   call cirrus_debug_dump
 #endif
-  cmp al, #0x0F
+  cmp al, #0x10
   ja cirrus_vesa_not_handled
   push bx
   xor bx, bx
@@ -682,7 +683,7 @@ c80h_2:
   ret
 
 cirrus_extbios_81h:
-  mov ax, #0x100 ;; XXX
+  mov ax, #0x103 ;; XXX
   ret
 cirrus_extbios_82h:
   push dx
@@ -1175,6 +1176,52 @@ cirrus_vesa_07h_2:
   mov  cx, ax
   pop  dx
   mov  ax, #0x004f
+  ret
+
+cirrus_vesa_10h: ;; Power management functions
+  ;; Set up DS to read stored power info from RAM
+  push ds
+#ifdef CIRRUS_VESA3_PMINFO
+ db 0x2e ;; cs:
+  mov ax, [cirrus_vesa_sel0000_data]
+#else
+  xor ax, ax
+#endif
+  mov  ds, ax
+  ;; Now choose the right function
+  cmp  bl, #0x00
+  ja   cirrus_vesa_10h_01
+  ;;
+  ;; Function 00h: Get capabilities
+  ;;
+  mov  bx, #0x0720 ;; 07: standby/suspend/off, 20: VBE/PM 2.0
+  mov  ax, #0x004f
+  jmp cirrus_vesa_10h_done
+cirrus_vesa_10h_01:
+  cmp  bl, #0x01
+  ja   cirrus_vesa_10h_02
+  ;;
+  ;; Function 01h: Set power state
+  ;; 
+  mov  ax, bx
+  mov  bx, # PM_BIOSMEM_VBE_POWER
+  mov  [bx], ah
+  mov  ax, #0x004f 
+  jmp cirrus_vesa_10h_done
+cirrus_vesa_10h_02:
+  cmp  bl, #0x02
+  ja   cirrus_vesa_10h_unimplemented
+  ;;
+  ;; Function 02h: Get power state
+  ;; 
+  mov  bx, # PM_BIOSMEM_VBE_POWER
+  mov  bh, [bx]
+  mov  ax, #0x004f 
+  jmp cirrus_vesa_10h_done
+cirrus_vesa_10h_unimplemented:
+  mov  ax, #0x014F ;; not implemented
+cirrus_vesa_10h_done:
+  pop ds
   ret
 
 cirrus_vesa_unimplemented:
@@ -1601,7 +1648,8 @@ cirrus_vesa_handlers:
   dw cirrus_vesa_unimplemented
   dw cirrus_vesa_unimplemented
   dw cirrus_vesa_unimplemented
-
+  ;; 10h
+  dw cirrus_vesa_10h
 
 
 ASM_END
diff -r 70ca37d22895 -r b58e95aee14f tools/firmware/vgabios/vgatables.h
--- a/tools/firmware/vgabios/vgatables.h        Wed May 21 11:07:23 2008 +0100
+++ b/tools/firmware/vgabios/vgatables.h        Wed May 21 11:19:41 2008 +0100
@@ -25,6 +25,7 @@
 #define BIOSMEM_VS_POINTER    0xA8
 #define BIOSMEM_VBE_FLAG      0xB9
 #define BIOSMEM_VBE_MODE      0xBA
+#define BIOSMEM_VBE_POWER     0xBC
 
 
 /*

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] vgabios: Support VESA power management extensions., Xen patchbot-unstable <=