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] hvm: Battery Management virtual firmware

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] hvm: Battery Management virtual firmware and toolstack changes
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 15 Oct 2008 04:50:14 -0700
Delivery-date: Wed, 15 Oct 2008 04:50:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 1223978895 -3600
# Node ID 551c3480beee8a3a29b5bf23cadbf8d953f75566
# Parent  8d993552673a98cbe26ed0df05499659c852b8d4
hvm: Battery Management virtual firmware and toolstack changes

Signed-off-by: Kamala Narasimhan <kamala.narasimhan@xxxxxxxxxx>
---
 tools/examples/xmexample.hvm              |    8 
 tools/firmware/hvmloader/acpi/Makefile    |    6 
 tools/firmware/hvmloader/acpi/build.c     |   13 
 tools/firmware/hvmloader/acpi/ssdt_pm.asl |  423 ++++++++++++++++++++++++++++++
 tools/firmware/hvmloader/acpi/ssdt_pm.h   |  202 ++++++++++++++
 tools/python/xen/xend/XendConfig.py       |    1 
 tools/python/xen/xend/image.py            |    8 
 tools/python/xen/xm/create.py             |    2 
 8 files changed, 659 insertions(+), 4 deletions(-)

diff -r 8d993552673a -r 551c3480beee tools/examples/xmexample.hvm
--- a/tools/examples/xmexample.hvm      Tue Oct 14 10:45:29 2008 +0100
+++ b/tools/examples/xmexample.hvm      Tue Oct 14 11:08:15 2008 +0100
@@ -52,6 +52,14 @@ name = "ExampleHVMDomain"
 # Enable/disable HVM APIC mode, default=1 (enabled)
 # Note that this option is ignored if vcpus > 1
 #apic=1
+
+# Enable/disable extended power management support within HVM guest, i.e., 
beyond
+# S3, S4, S5 within guest like exposing battery meter.
+# 0 (default option, extended power management support disabled)
+# 1 (pass-through mode; uses pass-through as needed; efficient but limited in 
scope)
+# 2 (non pass-through mode; extended scope, likely to work on all applicable 
environment
+#    but comparitively less efficient than pass-through mode)
+# xen_extended_power_mgmt=0
 
 # List of which CPUS this domain is allowed to use, default Xen picks
 #cpus = ""         # leave to Xen to pick
diff -r 8d993552673a -r 551c3480beee tools/firmware/hvmloader/acpi/Makefile
--- a/tools/firmware/hvmloader/acpi/Makefile    Tue Oct 14 10:45:29 2008 +0100
+++ b/tools/firmware/hvmloader/acpi/Makefile    Tue Oct 14 11:08:15 2008 +0100
@@ -30,10 +30,10 @@ vpath iasl $(PATH)
 vpath iasl $(PATH)
 all: acpi.a
 
-ssdt_tpm.h: ssdt_tpm.asl
+ssdt_pm.h ssdt_tpm.h: %.h: %.asl
        $(MAKE) iasl
-       iasl -tc ssdt_tpm.asl
-       mv ssdt_tpm.hex ssdt_tpm.h
+       iasl -tc $<
+       mv $*.hex $@
        rm -f *.aml
 
 dsdt.c: dsdt.asl
diff -r 8d993552673a -r 551c3480beee tools/firmware/hvmloader/acpi/build.c
--- a/tools/firmware/hvmloader/acpi/build.c     Tue Oct 14 10:45:29 2008 +0100
+++ b/tools/firmware/hvmloader/acpi/build.c     Tue Oct 14 11:08:15 2008 +0100
@@ -18,6 +18,7 @@
 
 #include "acpi2_0.h"
 #include "ssdt_tpm.h"
+#include "ssdt_pm.h"
 #include "../config.h"
 #include "../util.h"
 
@@ -66,6 +67,11 @@ static int hpet_exists(unsigned long hpe
 {
     uint32_t hpet_id = *(uint32_t *)hpet_base;
     return ((hpet_id >> 16) == 0x8086);
+}
+
+static uint8_t battery_port_exists(void)
+{
+    return (inb(0x88) == 0x1F);
 }
 
 static int construct_bios_info_table(uint8_t *buf)
@@ -208,6 +214,13 @@ static int construct_secondary_tables(ui
         hpet = (struct acpi_20_hpet *)&buf[offset];
         offset += construct_hpet(hpet);
         table_ptrs[nr_tables++] = (unsigned long)hpet;
+    }
+
+    if ( battery_port_exists() ) 
+    {
+        table_ptrs[nr_tables++] = (unsigned long)&buf[offset];
+        memcpy(&buf[offset], AmlCode_PM, sizeof(AmlCode_PM));
+        offset += align16(sizeof(AmlCode_PM));
     }
 
     /* TPM TCPA and SSDT. */
diff -r 8d993552673a -r 551c3480beee tools/firmware/hvmloader/acpi/ssdt_pm.asl
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/firmware/hvmloader/acpi/ssdt_pm.asl Tue Oct 14 11:08:15 2008 +0100
@@ -0,0 +1,423 @@
+/*
+ * ssdt_pm.asl
+ *
+ * Copyright (c) 2008  Kamala Narasimhan
+ * Copyright (c) 2008  Citrix Systems, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+/*
+ * SSDT for extended power management within HVM guest. Power management beyond
+ * S3, S4, S5 is handled by this vACPI layer.  
+ *
+ * Battery Management Implementation -
+ * Xen vACPI layer exposes battery information to guest using CMBattery
+ * interface. This virtual firmware CMBattery implementation is very similar to
+ * the actual firmware CMBattery implementation.  In fact, a good part of the
+ * below is heavily borrowed from the underlying firmware to support
+ * pass-through and non-pass-through battery management approaches using the
+ * same CMBattery interface implementation. When pass-through approach is used,
+ * the battery ports are directly mapped using xc_domain_ioport_mapping thus
+ * not relying on qemu battery port handling to intercept port reads/writes to
+ * feed relevant battery information to the guest.
+ *
+ * Following are the battery ports read/written to in order to implement
+ * battery support:
+ * Battery command port - 0xb2
+ * Batter data port     - 0x86
+ * Battery commands (written to port 0xb2) -
+ * 0x7b - Battery operation init
+ * 0x7c - Type of battery operation
+ * 0x79 - Get battery data length
+ * 0x7d - Get battery data
+ *
+ * Also the following ports are used for debugging/logging:
+ * 0xB040, 0xB044, 0xB046, 0xB048 
+ */
+
+DefinitionBlock ("SSDT_PM.aml", "SSDT", 2, "Xen", "HVM", 0)
+{
+    Scope (\_SB)
+    {
+        OperationRegion (DBGA, SystemIO, 0xB040, 0x01)
+        Field (DBGA, ByteAcc, NoLock, Preserve)
+        {
+            DBG1,   8,
+        }
+
+        OperationRegion (DBGB, SystemIO, 0xB044, 0x01)
+        Field (DBGB, ByteAcc, NoLock, Preserve)
+        {
+            DBG2,   8,
+        }
+
+        OperationRegion (DBGC, SystemIO, 0xB046, 0x01)
+        Field (DBGC, ByteAcc, NoLock, Preserve)
+        {
+            DBG3,   8,
+        }
+
+        OperationRegion (DBGD, SystemIO, 0xB048, 0x01)
+        Field (DBGD, ByteAcc, NoLock, Preserve)
+        {
+            DBG4,   8,
+        }
+
+        OperationRegion (PRT1, SystemIO, 0xB2, 0x02)
+        Field (PRT1, ByteAcc, NoLock, Preserve)
+        {
+            PB2,   8,
+            PB2A,   8
+        }
+
+        OperationRegion (PRT2, SystemIO, 0x86, 0x01)
+        Field (PRT2, ByteAcc, NoLock, Preserve)
+        {
+            P86,   8
+        }
+
+        OperationRegion (PRT3, SystemIO, 0x88, 0x01)
+        Field (PRT3, ByteAcc, NoLock, Preserve)
+        {
+            P88,  8
+        }
+
+
+        Mutex (SYNC, 0x01)
+        Name (BUF0, Buffer (0x0100) {})
+        Name (BUF1, Buffer (0x08) {})
+        CreateWordField (BUF1, 0x00, BUFA)
+        CreateWordField (BUF1, 0x04, BUFB)
+        Method (ACQR, 0, NotSerialized)
+        {
+            Acquire (SYNC, 0xFFFF)
+            Store (0x00, BUFA)
+        }
+
+        /*
+         * Initialize relevant buffer to indicate what type of
+         * information is being queried and by what object (e.g.
+         * by battery device 0 or 1).
+         */
+        Method (INIT, 1, NotSerialized)
+        {
+            Store (BUFA, Local0)
+            Increment (Local0)
+            If (LLessEqual (Local0, SizeOf (BUF0)))
+            {
+                CreateByteField (BUF0, BUFA, TMP1)
+                Store (Arg0, TMP1)
+                Store (Local0, BUFA)
+            }
+        }
+
+        /*
+         * Write to battery port 0xb2 indicating the type of information
+         * to request, initialize battery data port 0x86 and then return 
+         * value provided through data port 0x86.
+         */
+        Method (WPRT, 2, NotSerialized)
+        {
+            Store (Arg1, \_SB.P86)
+            Store (Arg0, \_SB.PB2)
+            Store (Arg0, \_SB.DBG2)
+            Store (Arg1, \_SB.DBG4)
+            Store (\_SB.PB2, Local0)
+            While (LNotEqual (Local0, 0x00))
+            {
+                Store (\_SB.PB2, Local0)
+            }
+
+            Store (\_SB.P86, Local1)
+            Store (Local1, \_SB.DBG3)
+            Return (\_SB.P86)
+        }
+
+        /*
+         * Helper method 1 to write to battery command and data port. 
+         * 0x7c written to port 0xb2 indicating battery info type command.
+         * Value 1 or 2 written to port 0x86.  1 for BIF (batterry info) and 2 
+         * for BST (battery status).
+         */
+        Method (HLP1, 2, NotSerialized)
+        {
+            If (LLess (Arg1, SizeOf (Arg0)))
+            {
+                CreateByteField (Arg0, Arg1, TMP1)
+                WPRT (0x7C, TMP1)
+            }
+        }
+
+        /*
+         * Helper method 2.  Value 0x7b written to battery command port 0xb2
+         * indicating battery info initialization request.  First thing written
+         * to battery port before querying for further information pertaining
+         * to the battery.
+         */
+        Method (HLP2, 0, NotSerialized)
+        {
+            WPRT (0x7B, 0x00)
+            Store (0x00, Local0)
+            While (LLess (Local0, BUFA))
+            {
+                HLP1 (BUF0, Local0)
+                Increment (Local0)
+            }
+        }
+
+        /*
+         * Helper method 3. 0x7d written to battery command port 0xb2
+         * indicating request of battery data returned through battery data
+         * port 0x86.
+         */
+        Method (HLP3, 2, NotSerialized)
+        {
+            If (LLess (Arg1, SizeOf (Arg0)))
+            {
+                CreateByteField (Arg0, Arg1, TMP1)
+                Store (WPRT (0x7D, 0x00), TMP1)
+            }
+        }
+
+        /*
+         * Helper method 4 to indirectly get battery data and store it in a
+         * local buffer.
+         */
+        Method (HLP4, 0, NotSerialized)
+        {
+            Store (0x00, Local0)
+            While (LLess (Local0, BUFB))
+            {
+                Add (BUFA, Local0, Local1)
+                HLP3 (BUF0, Local1)
+                Increment (Local0)
+            }
+        }
+
+        /*
+         * Helper method 5 to indirectly initialize battery port and get
+         * battery data. Also get battery data length by writing 0x79 to
+         * battery command port and receiving battery data length in port 0x86.
+         */
+        Method (HLP5, 0, NotSerialized)
+        {
+            HLP2 ()
+            Store (WPRT (0x79, 0x00), BUFB)
+            Add (BUFA, BUFB, Local0)
+            If (LLess (SizeOf (BUF0), Local0))
+            {
+                Store (SizeOf (BUF0), Local0)
+                Subtract (Local0, BUFA, Local0)
+                Store (Local0, BUFB)
+            }
+
+            HLP4 ()
+        }
+
+        /* Helper method for local buffer housekeeping... */
+        Method (HLP6, 0, NotSerialized)
+        {
+            Store (BUFA, Local0)
+            Increment (Local0)
+            If (LLessEqual (Local0, SizeOf (BUF0)))
+            {
+                CreateByteField (BUF0, BUFA, TMP1)
+                Store (Local0, BUFA)
+                Return (TMP1)
+            }
+
+            Return (0x00)
+        }
+
+        /* Helper methods to help store battery data retrieved through
+         * battery data port 0x86. */
+
+        Method (HLP7, 0, NotSerialized)
+        {
+            Store (BUFA, Local0)
+            Add (Local0, 0x04, Local0)
+            If (LLessEqual (Local0, SizeOf (BUF0)))
+            {
+                CreateDWordField (BUF0, BUFA, SX22)
+                Store (Local0, BUFA)
+                Return (SX22)
+            }
+
+            Return (0x00)
+        }
+
+        Method (HLP8, 2, NotSerialized)
+        {
+            If (LLess (Arg1, SizeOf (Arg0)))
+            {
+                CreateByteField (Arg0, Arg1, TMP1)
+                Store (HLP6 (), TMP1)
+            }
+        }
+
+        Method (HLP9, 2, NotSerialized)
+        {
+            Store (0x00, Local0)
+            While (LLess (Local0, Arg1))
+            {
+                HLP8 (Arg0, Local0)
+                Increment (Local0)
+            }
+        }
+
+        Method (HLPA, 0, NotSerialized)
+        {
+            Store (HLP6 (), Local0)
+            Name (TMP, Buffer (Local0) {})
+            HLP9 (TMP, Local0)
+            Return (TMP)
+        }
+
+        Method (REL, 0, NotSerialized)
+        {
+            Release (SYNC)
+        }
+
+        /* Future patches will extend AC object to better account for
+         * AC to DC transition and more. */
+        Device (AC)
+        {
+            Name (_HID, "ACPI0003")
+            Name (_PCL, Package (0x03)
+            {
+                \_SB,
+                BAT0,
+                BAT1 
+            })
+            Method (_PSR, 0, NotSerialized)
+            {
+                Return (0x0)
+            }
+
+            Method (_STA, 0, NotSerialized)
+            {
+                Return (0x0F)
+            }
+        }
+
+        /* Main battery information helper method. */
+        Name (BIFP, Package (0x0D) {})
+        Method (BIF, 1, NotSerialized)
+        {
+            ACQR ()
+            INIT (0x01)
+            INIT (Arg0)
+            HLP5 ()
+            Store (HLP7 (), Index (BIFP, 0x00))
+            Store (HLP7 (), Index (BIFP, 0x01))
+            Store (HLP7 (), Index (BIFP, 0x02))
+            Store (HLP7 (), Index (BIFP, 0x03))
+            Store (HLP7 (), Index (BIFP, 0x04))
+            Store (HLP7 (), Index (BIFP, 0x05))
+            Store (HLP7 (), Index (BIFP, 0x06))
+            Store (HLP7 (), Index (BIFP, 0x07))
+            Store (HLP7 (), Index (BIFP, 0x08))
+            Store (HLPA (), Index (BIFP, 0x09))
+            Store (HLPA (), Index (BIFP, 0x0A))
+            Store (HLPA (), Index (BIFP, 0x0B))
+            Store (HLPA (), Index (BIFP, 0x0C))
+            REL ()
+            Return (BIFP)
+        }
+
+        /* Battery object 0 - Always exposed as present. */
+        Device (BAT0)
+        {
+            Name (_HID, EisaId ("PNP0C0A"))
+            Name (_UID, 0x01)
+            Name (_PCL, Package (0x01)
+            {
+                \_SB
+            })
+
+            /* Always returns 0x1f indicating battery present. */
+            Method (_STA, 0, NotSerialized)
+            {
+                Store (\_SB.P88, Local0)
+                Return ( Local0 )
+            }
+
+            /* Battery generic info: design capacity, voltage, model # etc. */
+            Method (_BIF, 0, NotSerialized)
+            {
+                //Store (1, \_SB.DBG1)
+                Store(BIF ( 0x01 ), Local0)
+                //Store (2, \_SB.DBG1)
+                Return( Local0 )
+            }
+
+            /* Battery status including battery charging/discharging rate. */
+            Method (_BST, 0, NotSerialized)
+            {
+                Store (1, \_SB.DBG1)
+                ACQR ()
+                INIT (0x02)
+                INIT (0x01)
+                HLP5 ()
+                Name (BST0, Package (0x04) {})
+                Store (HLP7 (), Index (BST0, 0x00))
+                Store (HLP7 (), Index (BST0, 0x01))
+                Store (HLP7 (), Index (BST0, 0x02))
+                Store (HLP7 (), Index (BST0, 0x03))
+                REL ()
+                Store (2, \_SB.DBG1)
+                Return (BST0)
+            }
+        }
+
+        /* Battery object 1 - Always exposed as not present. */
+        Device (BAT1)
+        {
+            Name (_HID, EisaId ("PNP0C0A"))
+            Name (_UID, 0x02)
+            Name (_PCL, Package (0x01)
+            {
+                \_SB
+            })
+            Method (_STA, 0, NotSerialized)
+            {
+                Return (0x0F)
+            }
+
+            Method (_BIF, 0, NotSerialized)
+            {
+                Store (\_SB.PB2, Local0)
+                Return (BIF (0x02))
+            }
+
+            Method (_BST, 0, NotSerialized)
+            {
+                ACQR ()
+                INIT (0x02)
+                INIT (0x02)
+                HLP5 ()
+                Name (BST1, Package (0x04) {})
+                Store (HLP7 (), Index (BST1, 0x00))
+                Store (HLP7 (), Index (BST1, 0x01))
+                Store (HLP7 (), Index (BST1, 0x02))
+                Store (HLP7 (), Index (BST1, 0x03))
+                REL ()
+                Return (BST1)
+            }
+        }
+    }
+}
+
diff -r 8d993552673a -r 551c3480beee tools/firmware/hvmloader/acpi/ssdt_pm.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/firmware/hvmloader/acpi/ssdt_pm.h   Tue Oct 14 11:08:15 2008 +0100
@@ -0,0 +1,202 @@
+/*
+ * 
+ * Intel ACPI Component Architecture
+ * ASL Optimizing Compiler version 20061109 [May 18 2007]
+ * Copyright (C) 2000 - 2006 Intel Corporation
+ * Supports ACPI Specification Revision 3.0a
+ * 
+ * Compilation of "ssdt_pm.asl" - Sun Oct 12 23:57:51 2008
+ * 
+ * C source code output
+ *
+ */
+unsigned char AmlCode_PM[] =
+{
+    0x53,0x53,0x44,0x54,0xD6,0x05,0x00,0x00,  /* 00000000    "SSDT...." */
+    0x02,0xD9,0x58,0x65,0x6E,0x00,0x00,0x00,  /* 00000008    "..Xen..." */
+    0x48,0x56,0x4D,0x00,0x00,0x00,0x00,0x00,  /* 00000010    "HVM....." */
+    0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C,  /* 00000018    "....INTL" */
+    0x09,0x11,0x06,0x20,0x10,0x41,0x5B,0x5C,  /* 00000020    "... .A[\" */
+    0x5F,0x53,0x42,0x5F,0x5B,0x80,0x44,0x42,  /* 00000028    "_SB_[.DB" */
+    0x47,0x41,0x01,0x0B,0x40,0xB0,0x01,0x5B,  /* 00000030    "GA..@..[" */
+    0x81,0x0B,0x44,0x42,0x47,0x41,0x01,0x44,  /* 00000038    "..DBGA.D" */
+    0x42,0x47,0x31,0x08,0x5B,0x80,0x44,0x42,  /* 00000040    "BG1.[.DB" */
+    0x47,0x42,0x01,0x0B,0x44,0xB0,0x01,0x5B,  /* 00000048    "GB..D..[" */
+    0x81,0x0B,0x44,0x42,0x47,0x42,0x01,0x44,  /* 00000050    "..DBGB.D" */
+    0x42,0x47,0x32,0x08,0x5B,0x80,0x44,0x42,  /* 00000058    "BG2.[.DB" */
+    0x47,0x43,0x01,0x0B,0x46,0xB0,0x01,0x5B,  /* 00000060    "GC..F..[" */
+    0x81,0x0B,0x44,0x42,0x47,0x43,0x01,0x44,  /* 00000068    "..DBGC.D" */
+    0x42,0x47,0x33,0x08,0x5B,0x80,0x44,0x42,  /* 00000070    "BG3.[.DB" */
+    0x47,0x44,0x01,0x0B,0x48,0xB0,0x01,0x5B,  /* 00000078    "GD..H..[" */
+    0x81,0x0B,0x44,0x42,0x47,0x44,0x01,0x44,  /* 00000080    "..DBGD.D" */
+    0x42,0x47,0x34,0x08,0x5B,0x80,0x50,0x52,  /* 00000088    "BG4.[.PR" */
+    0x54,0x31,0x01,0x0A,0xB2,0x0A,0x02,0x5B,  /* 00000090    "T1.....[" */
+    0x81,0x10,0x50,0x52,0x54,0x31,0x01,0x50,  /* 00000098    "..PRT1.P" */
+    0x42,0x32,0x5F,0x08,0x50,0x42,0x32,0x41,  /* 000000A0    "B2_.PB2A" */
+    0x08,0x5B,0x80,0x50,0x52,0x54,0x32,0x01,  /* 000000A8    ".[.PRT2." */
+    0x0A,0x86,0x01,0x5B,0x81,0x0B,0x50,0x52,  /* 000000B0    "...[..PR" */
+    0x54,0x32,0x01,0x50,0x38,0x36,0x5F,0x08,  /* 000000B8    "T2.P86_." */
+    0x5B,0x80,0x50,0x52,0x54,0x33,0x01,0x0A,  /* 000000C0    "[.PRT3.." */
+    0x88,0x01,0x5B,0x81,0x0B,0x50,0x52,0x54,  /* 000000C8    "..[..PRT" */
+    0x33,0x01,0x50,0x38,0x38,0x5F,0x08,0x5B,  /* 000000D0    "3.P88_.[" */
+    0x01,0x53,0x59,0x4E,0x43,0x01,0x08,0x42,  /* 000000D8    ".SYNC..B" */
+    0x55,0x46,0x30,0x11,0x04,0x0B,0x00,0x01,  /* 000000E0    "UF0....." */
+    0x08,0x42,0x55,0x46,0x31,0x11,0x03,0x0A,  /* 000000E8    ".BUF1..." */
+    0x08,0x8B,0x42,0x55,0x46,0x31,0x00,0x42,  /* 000000F0    "..BUF1.B" */
+    0x55,0x46,0x41,0x8B,0x42,0x55,0x46,0x31,  /* 000000F8    "UFA.BUF1" */
+    0x0A,0x04,0x42,0x55,0x46,0x42,0x14,0x14,  /* 00000100    "..BUFB.." */
+    0x41,0x43,0x51,0x52,0x00,0x5B,0x23,0x53,  /* 00000108    "ACQR.[#S" */
+    0x59,0x4E,0x43,0xFF,0xFF,0x70,0x00,0x42,  /* 00000110    "YNC..p.B" */
+    0x55,0x46,0x41,0x14,0x31,0x49,0x4E,0x49,  /* 00000118    "UFA.1INI" */
+    0x54,0x01,0x70,0x42,0x55,0x46,0x41,0x60,  /* 00000120    "T.pBUFA`" */
+    0x75,0x60,0xA0,0x22,0x92,0x94,0x60,0x87,  /* 00000128    "u`."..`." */
+    0x42,0x55,0x46,0x30,0x8C,0x42,0x55,0x46,  /* 00000130    "BUF0.BUF" */
+    0x30,0x42,0x55,0x46,0x41,0x54,0x4D,0x50,  /* 00000138    "0BUFATMP" */
+    0x31,0x70,0x68,0x54,0x4D,0x50,0x31,0x70,  /* 00000140    "1phTMP1p" */
+    0x60,0x42,0x55,0x46,0x41,0x14,0x48,0x07,  /* 00000148    "`BUFA.H." */
+    0x57,0x50,0x52,0x54,0x02,0x70,0x69,0x5C,  /* 00000150    "WPRT.pi\" */
+    0x2E,0x5F,0x53,0x42,0x5F,0x50,0x38,0x36,  /* 00000158    "._SB_P86" */
+    0x5F,0x70,0x68,0x5C,0x2E,0x5F,0x53,0x42,  /* 00000160    "_ph\._SB" */
+    0x5F,0x50,0x42,0x32,0x5F,0x70,0x68,0x5C,  /* 00000168    "_PB2_ph\" */
+    0x2E,0x5F,0x53,0x42,0x5F,0x44,0x42,0x47,  /* 00000170    "._SB_DBG" */
+    0x32,0x70,0x69,0x5C,0x2E,0x5F,0x53,0x42,  /* 00000178    "2pi\._SB" */
+    0x5F,0x44,0x42,0x47,0x34,0x70,0x5C,0x2E,  /* 00000180    "_DBG4p\." */
+    0x5F,0x53,0x42,0x5F,0x50,0x42,0x32,0x5F,  /* 00000188    "_SB_PB2_" */
+    0x60,0xA2,0x11,0x92,0x93,0x60,0x00,0x70,  /* 00000190    "`....`.p" */
+    0x5C,0x2E,0x5F,0x53,0x42,0x5F,0x50,0x42,  /* 00000198    "\._SB_PB" */
+    0x32,0x5F,0x60,0x70,0x5C,0x2E,0x5F,0x53,  /* 000001A0    "2_`p\._S" */
+    0x42,0x5F,0x50,0x38,0x36,0x5F,0x61,0x70,  /* 000001A8    "B_P86_ap" */
+    0x61,0x5C,0x2E,0x5F,0x53,0x42,0x5F,0x44,  /* 000001B0    "a\._SB_D" */
+    0x42,0x47,0x33,0xA4,0x5C,0x2E,0x5F,0x53,  /* 000001B8    "BG3.\._S" */
+    0x42,0x5F,0x50,0x38,0x36,0x5F,0x14,0x1D,  /* 000001C0    "B_P86_.." */
+    0x48,0x4C,0x50,0x31,0x02,0xA0,0x16,0x95,  /* 000001C8    "HLP1...." */
+    0x69,0x87,0x68,0x8C,0x68,0x69,0x54,0x4D,  /* 000001D0    "i.h.hiTM" */
+    0x50,0x31,0x57,0x50,0x52,0x54,0x0A,0x7C,  /* 000001D8    "P1WPRT.|" */
+    0x54,0x4D,0x50,0x31,0x14,0x23,0x48,0x4C,  /* 000001E0    "TMP1.#HL" */
+    0x50,0x32,0x00,0x57,0x50,0x52,0x54,0x0A,  /* 000001E8    "P2.WPRT." */
+    0x7B,0x00,0x70,0x00,0x60,0xA2,0x12,0x95,  /* 000001F0    "{.p.`..." */
+    0x60,0x42,0x55,0x46,0x41,0x48,0x4C,0x50,  /* 000001F8    "`BUFAHLP" */
+    0x31,0x42,0x55,0x46,0x30,0x60,0x75,0x60,  /* 00000200    "1BUF0`u`" */
+    0x14,0x1F,0x48,0x4C,0x50,0x33,0x02,0xA0,  /* 00000208    "..HLP3.." */
+    0x18,0x95,0x69,0x87,0x68,0x8C,0x68,0x69,  /* 00000210    "..i.h.hi" */
+    0x54,0x4D,0x50,0x31,0x70,0x57,0x50,0x52,  /* 00000218    "TMP1pWPR" */
+    0x54,0x0A,0x7D,0x00,0x54,0x4D,0x50,0x31,  /* 00000220    "T.}.TMP1" */
+    0x14,0x23,0x48,0x4C,0x50,0x34,0x00,0x70,  /* 00000228    ".#HLP4.p" */
+    0x00,0x60,0xA2,0x19,0x95,0x60,0x42,0x55,  /* 00000230    ".`...`BU" */
+    0x46,0x42,0x72,0x42,0x55,0x46,0x41,0x60,  /* 00000238    "FBrBUFA`" */
+    0x61,0x48,0x4C,0x50,0x33,0x42,0x55,0x46,  /* 00000240    "aHLP3BUF" */
+    0x30,0x61,0x75,0x60,0x14,0x42,0x04,0x48,  /* 00000248    "0au`.B.H" */
+    0x4C,0x50,0x35,0x00,0x48,0x4C,0x50,0x32,  /* 00000250    "LP5.HLP2" */
+    0x70,0x57,0x50,0x52,0x54,0x0A,0x79,0x00,  /* 00000258    "pWPRT.y." */
+    0x42,0x55,0x46,0x42,0x72,0x42,0x55,0x46,  /* 00000260    "BUFBrBUF" */
+    0x41,0x42,0x55,0x46,0x42,0x60,0xA0,0x1C,  /* 00000268    "ABUFB`.." */
+    0x95,0x87,0x42,0x55,0x46,0x30,0x60,0x70,  /* 00000270    "..BUF0`p" */
+    0x87,0x42,0x55,0x46,0x30,0x60,0x74,0x60,  /* 00000278    ".BUF0`t`" */
+    0x42,0x55,0x46,0x41,0x60,0x70,0x60,0x42,  /* 00000280    "BUFA`p`B" */
+    0x55,0x46,0x42,0x48,0x4C,0x50,0x34,0x14,  /* 00000288    "UFBHLP4." */
+    0x32,0x48,0x4C,0x50,0x36,0x00,0x70,0x42,  /* 00000290    "2HLP6.pB" */
+    0x55,0x46,0x41,0x60,0x75,0x60,0xA0,0x21,  /* 00000298    "UFA`u`.!" */
+    0x92,0x94,0x60,0x87,0x42,0x55,0x46,0x30,  /* 000002A0    "..`.BUF0" */
+    0x8C,0x42,0x55,0x46,0x30,0x42,0x55,0x46,  /* 000002A8    ".BUF0BUF" */
+    0x41,0x54,0x4D,0x50,0x31,0x70,0x60,0x42,  /* 000002B0    "ATMP1p`B" */
+    0x55,0x46,0x41,0xA4,0x54,0x4D,0x50,0x31,  /* 000002B8    "UFA.TMP1" */
+    0xA4,0x00,0x14,0x35,0x48,0x4C,0x50,0x37,  /* 000002C0    "...5HLP7" */
+    0x00,0x70,0x42,0x55,0x46,0x41,0x60,0x72,  /* 000002C8    ".pBUFA`r" */
+    0x60,0x0A,0x04,0x60,0xA0,0x21,0x92,0x94,  /* 000002D0    "`..`.!.." */
+    0x60,0x87,0x42,0x55,0x46,0x30,0x8A,0x42,  /* 000002D8    "`.BUF0.B" */
+    0x55,0x46,0x30,0x42,0x55,0x46,0x41,0x53,  /* 000002E0    "UF0BUFAS" */
+    0x58,0x32,0x32,0x70,0x60,0x42,0x55,0x46,  /* 000002E8    "X22p`BUF" */
+    0x41,0xA4,0x53,0x58,0x32,0x32,0xA4,0x00,  /* 000002F0    "A.SX22.." */
+    0x14,0x1C,0x48,0x4C,0x50,0x38,0x02,0xA0,  /* 000002F8    "..HLP8.." */
+    0x15,0x95,0x69,0x87,0x68,0x8C,0x68,0x69,  /* 00000300    "..i.h.hi" */
+    0x54,0x4D,0x50,0x31,0x70,0x48,0x4C,0x50,  /* 00000308    "TMP1pHLP" */
+    0x36,0x54,0x4D,0x50,0x31,0x14,0x16,0x48,  /* 00000310    "6TMP1..H" */
+    0x4C,0x50,0x39,0x02,0x70,0x00,0x60,0xA2,  /* 00000318    "LP9.p.`." */
+    0x0C,0x95,0x60,0x69,0x48,0x4C,0x50,0x38,  /* 00000320    "..`iHLP8" */
+    0x68,0x60,0x75,0x60,0x14,0x22,0x48,0x4C,  /* 00000328    "h`u`."HL" */
+    0x50,0x41,0x00,0x70,0x48,0x4C,0x50,0x36,  /* 00000330    "PA.pHLP6" */
+    0x60,0x08,0x54,0x4D,0x50,0x5F,0x11,0x02,  /* 00000338    "`.TMP_.." */
+    0x60,0x48,0x4C,0x50,0x39,0x54,0x4D,0x50,  /* 00000340    "`HLP9TMP" */
+    0x5F,0x60,0xA4,0x54,0x4D,0x50,0x5F,0x14,  /* 00000348    "_`.TMP_." */
+    0x0C,0x52,0x45,0x4C,0x5F,0x00,0x5B,0x27,  /* 00000350    ".REL_.['" */
+    0x53,0x59,0x4E,0x43,0x5B,0x82,0x3C,0x41,  /* 00000358    "SYNC[.<A" */
+    0x43,0x5F,0x5F,0x08,0x5F,0x48,0x49,0x44,  /* 00000360    "C__._HID" */
+    0x0D,0x41,0x43,0x50,0x49,0x30,0x30,0x30,  /* 00000368    ".ACPI000" */
+    0x33,0x00,0x08,0x5F,0x50,0x43,0x4C,0x12,  /* 00000370    "3.._PCL." */
+    0x0F,0x03,0x5C,0x5F,0x53,0x42,0x5F,0x42,  /* 00000378    "..\_SB_B" */
+    0x41,0x54,0x30,0x42,0x41,0x54,0x31,0x14,  /* 00000380    "AT0BAT1." */
+    0x08,0x5F,0x50,0x53,0x52,0x00,0xA4,0x00,  /* 00000388    "._PSR..." */
+    0x14,0x09,0x5F,0x53,0x54,0x41,0x00,0xA4,  /* 00000390    ".._STA.." */
+    0x0A,0x0F,0x08,0x42,0x49,0x46,0x50,0x12,  /* 00000398    "...BIFP." */
+    0x02,0x0D,0x14,0x49,0x0C,0x42,0x49,0x46,  /* 000003A0    "...I.BIF" */
+    0x5F,0x01,0x41,0x43,0x51,0x52,0x49,0x4E,  /* 000003A8    "_.ACQRIN" */
+    0x49,0x54,0x01,0x49,0x4E,0x49,0x54,0x68,  /* 000003B0    "IT.INITh" */
+    0x48,0x4C,0x50,0x35,0x70,0x48,0x4C,0x50,  /* 000003B8    "HLP5pHLP" */
+    0x37,0x88,0x42,0x49,0x46,0x50,0x00,0x00,  /* 000003C0    "7.BIFP.." */
+    0x70,0x48,0x4C,0x50,0x37,0x88,0x42,0x49,  /* 000003C8    "pHLP7.BI" */
+    0x46,0x50,0x01,0x00,0x70,0x48,0x4C,0x50,  /* 000003D0    "FP..pHLP" */
+    0x37,0x88,0x42,0x49,0x46,0x50,0x0A,0x02,  /* 000003D8    "7.BIFP.." */
+    0x00,0x70,0x48,0x4C,0x50,0x37,0x88,0x42,  /* 000003E0    ".pHLP7.B" */
+    0x49,0x46,0x50,0x0A,0x03,0x00,0x70,0x48,  /* 000003E8    "IFP...pH" */
+    0x4C,0x50,0x37,0x88,0x42,0x49,0x46,0x50,  /* 000003F0    "LP7.BIFP" */
+    0x0A,0x04,0x00,0x70,0x48,0x4C,0x50,0x37,  /* 000003F8    "...pHLP7" */
+    0x88,0x42,0x49,0x46,0x50,0x0A,0x05,0x00,  /* 00000400    ".BIFP..." */
+    0x70,0x48,0x4C,0x50,0x37,0x88,0x42,0x49,  /* 00000408    "pHLP7.BI" */
+    0x46,0x50,0x0A,0x06,0x00,0x70,0x48,0x4C,  /* 00000410    "FP...pHL" */
+    0x50,0x37,0x88,0x42,0x49,0x46,0x50,0x0A,  /* 00000418    "P7.BIFP." */
+    0x07,0x00,0x70,0x48,0x4C,0x50,0x37,0x88,  /* 00000420    "..pHLP7." */
+    0x42,0x49,0x46,0x50,0x0A,0x08,0x00,0x70,  /* 00000428    "BIFP...p" */
+    0x48,0x4C,0x50,0x41,0x88,0x42,0x49,0x46,  /* 00000430    "HLPA.BIF" */
+    0x50,0x0A,0x09,0x00,0x70,0x48,0x4C,0x50,  /* 00000438    "P...pHLP" */
+    0x41,0x88,0x42,0x49,0x46,0x50,0x0A,0x0A,  /* 00000440    "A.BIFP.." */
+    0x00,0x70,0x48,0x4C,0x50,0x41,0x88,0x42,  /* 00000448    ".pHLPA.B" */
+    0x49,0x46,0x50,0x0A,0x0B,0x00,0x70,0x48,  /* 00000450    "IFP...pH" */
+    0x4C,0x50,0x41,0x88,0x42,0x49,0x46,0x50,  /* 00000458    "LPA.BIFP" */
+    0x0A,0x0C,0x00,0x52,0x45,0x4C,0x5F,0xA4,  /* 00000460    "...REL_." */
+    0x42,0x49,0x46,0x50,0x5B,0x82,0x4F,0x0B,  /* 00000468    "BIFP[.O." */
+    0x42,0x41,0x54,0x30,0x08,0x5F,0x48,0x49,  /* 00000470    "BAT0._HI" */
+    0x44,0x0C,0x41,0xD0,0x0C,0x0A,0x08,0x5F,  /* 00000478    "D.A...._" */
+    0x55,0x49,0x44,0x01,0x08,0x5F,0x50,0x43,  /* 00000480    "UID.._PC" */
+    0x4C,0x12,0x07,0x01,0x5C,0x5F,0x53,0x42,  /* 00000488    "L...\_SB" */
+    0x5F,0x14,0x14,0x5F,0x53,0x54,0x41,0x00,  /* 00000490    "_.._STA." */
+    0x70,0x5C,0x2E,0x5F,0x53,0x42,0x5F,0x50,  /* 00000498    "p\._SB_P" */
+    0x38,0x38,0x5F,0x60,0xA4,0x60,0x14,0x0F,  /* 000004A0    "88_`.`.." */
+    0x5F,0x42,0x49,0x46,0x00,0x70,0x42,0x49,  /* 000004A8    "_BIF.pBI" */
+    0x46,0x5F,0x01,0x60,0xA4,0x60,0x14,0x46,  /* 000004B0    "F_.`.`.F" */
+    0x07,0x5F,0x42,0x53,0x54,0x00,0x70,0x01,  /* 000004B8    "._BST.p." */
+    0x5C,0x2E,0x5F,0x53,0x42,0x5F,0x44,0x42,  /* 000004C0    "\._SB_DB" */
+    0x47,0x31,0x41,0x43,0x51,0x52,0x49,0x4E,  /* 000004C8    "G1ACQRIN" */
+    0x49,0x54,0x0A,0x02,0x49,0x4E,0x49,0x54,  /* 000004D0    "IT..INIT" */
+    0x01,0x48,0x4C,0x50,0x35,0x08,0x42,0x53,  /* 000004D8    ".HLP5.BS" */
+    0x54,0x30,0x12,0x02,0x04,0x70,0x48,0x4C,  /* 000004E0    "T0...pHL" */
+    0x50,0x37,0x88,0x42,0x53,0x54,0x30,0x00,  /* 000004E8    "P7.BST0." */
+    0x00,0x70,0x48,0x4C,0x50,0x37,0x88,0x42,  /* 000004F0    ".pHLP7.B" */
+    0x53,0x54,0x30,0x01,0x00,0x70,0x48,0x4C,  /* 000004F8    "ST0..pHL" */
+    0x50,0x37,0x88,0x42,0x53,0x54,0x30,0x0A,  /* 00000500    "P7.BST0." */
+    0x02,0x00,0x70,0x48,0x4C,0x50,0x37,0x88,  /* 00000508    "..pHLP7." */
+    0x42,0x53,0x54,0x30,0x0A,0x03,0x00,0x52,  /* 00000510    "BST0...R" */
+    0x45,0x4C,0x5F,0x70,0x0A,0x02,0x5C,0x2E,  /* 00000518    "EL_p..\." */
+    0x5F,0x53,0x42,0x5F,0x44,0x42,0x47,0x31,  /* 00000520    "_SB_DBG1" */
+    0xA4,0x42,0x53,0x54,0x30,0x5B,0x82,0x47,  /* 00000528    ".BST0[.G" */
+    0x0A,0x42,0x41,0x54,0x31,0x08,0x5F,0x48,  /* 00000530    ".BAT1._H" */
+    0x49,0x44,0x0C,0x41,0xD0,0x0C,0x0A,0x08,  /* 00000538    "ID.A...." */
+    0x5F,0x55,0x49,0x44,0x0A,0x02,0x08,0x5F,  /* 00000540    "_UID..._" */
+    0x50,0x43,0x4C,0x12,0x07,0x01,0x5C,0x5F,  /* 00000548    "PCL...\_" */
+    0x53,0x42,0x5F,0x14,0x09,0x5F,0x53,0x54,  /* 00000550    "SB_.._ST" */
+    0x41,0x00,0xA4,0x0A,0x0F,0x14,0x19,0x5F,  /* 00000558    "A......_" */
+    0x42,0x49,0x46,0x00,0x70,0x5C,0x2E,0x5F,  /* 00000560    "BIF.p\._" */
+    0x53,0x42,0x5F,0x50,0x42,0x32,0x5F,0x60,  /* 00000568    "SB_PB2_`" */
+    0xA4,0x42,0x49,0x46,0x5F,0x0A,0x02,0x14,  /* 00000570    ".BIF_..." */
+    0x4E,0x05,0x5F,0x42,0x53,0x54,0x00,0x41,  /* 00000578    "N._BST.A" */
+    0x43,0x51,0x52,0x49,0x4E,0x49,0x54,0x0A,  /* 00000580    "CQRINIT." */
+    0x02,0x49,0x4E,0x49,0x54,0x0A,0x02,0x48,  /* 00000588    ".INIT..H" */
+    0x4C,0x50,0x35,0x08,0x42,0x53,0x54,0x31,  /* 00000590    "LP5.BST1" */
+    0x12,0x02,0x04,0x70,0x48,0x4C,0x50,0x37,  /* 00000598    "...pHLP7" */
+    0x88,0x42,0x53,0x54,0x31,0x00,0x00,0x70,  /* 000005A0    ".BST1..p" */
+    0x48,0x4C,0x50,0x37,0x88,0x42,0x53,0x54,  /* 000005A8    "HLP7.BST" */
+    0x31,0x01,0x00,0x70,0x48,0x4C,0x50,0x37,  /* 000005B0    "1..pHLP7" */
+    0x88,0x42,0x53,0x54,0x31,0x0A,0x02,0x00,  /* 000005B8    ".BST1..." */
+    0x70,0x48,0x4C,0x50,0x37,0x88,0x42,0x53,  /* 000005C0    "pHLP7.BS" */
+    0x54,0x31,0x0A,0x03,0x00,0x52,0x45,0x4C,  /* 000005C8    "T1...REL" */
+    0x5F,0xA4,0x42,0x53,0x54,0x31,
+};
diff -r 8d993552673a -r 551c3480beee tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Tue Oct 14 10:45:29 2008 +0100
+++ b/tools/python/xen/xend/XendConfig.py       Tue Oct 14 11:08:15 2008 +0100
@@ -163,6 +163,7 @@ XENAPI_PLATFORM_CFG_TYPES = {
     'vhpt': int,
     'guest_os_type': str,
     'hap': int,
+    'xen_extended_power_mgmt': int,
 }
 
 # Xen API console 'other_config' keys.
diff -r 8d993552673a -r 551c3480beee tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Tue Oct 14 10:45:29 2008 +0100
+++ b/tools/python/xen/xend/image.py    Tue Oct 14 11:08:15 2008 +0100
@@ -249,6 +249,14 @@ class ImageHandler:
     # xm config file
     def parseDeviceModelArgs(self, vmConfig):
         ret = ["-domain-name", str(self.vm.info['name_label'])]
+
+        xen_extended_power_mgmt = int(vmConfig['platform'].get(
+            'xen_extended_power_mgmt', 0))
+        if xen_extended_power_mgmt != 0:
+             xstransact.Store("/local/domain/0/device-model/%i"
+                              % self.vm.getDomid(),
+                              ('xen_extended_power_mgmt',
+                               xen_extended_power_mgmt))
 
         # Find RFB console device, and if it exists, make QEMU enable
         # the VNC console.
diff -r 8d993552673a -r 551c3480beee tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Tue Oct 14 10:45:29 2008 +0100
+++ b/tools/python/xen/xm/create.py     Tue Oct 14 11:08:15 2008 +0100
@@ -862,7 +862,7 @@ def configure_hvm(config_image, vals):
              'sdl', 'display', 'xauthority', 'rtc_timeoffset', 'monitor',
              'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci', 'hpet',
              'guest_os_type', 'hap', 'opengl', 'cpuid', 'cpuid_check',
-             'viridian' ]
+             'viridian', 'xen_extended_power_mgmt' ]
 
     for a in args:
         if a in vals.__dict__ and vals.__dict__[a] is not None:

_______________________________________________
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] hvm: Battery Management virtual firmware and toolstack changes, Xen patchbot-unstable <=