# but comparitively less efficient than pass-through mode)
# xen_extended_power_mgmt=0
+# 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
#cpus = "0" # all vcpus run on CPU0
include $(XEN_ROOT)/tools/firmware/Rules.mk
C_SRC = build.c dsdt.c static_tables.c
-H_SRC = $(wildcard *.h)
+H_SRC = $(wildcard *.h) ssdt_pm.h ssdt_tpm.h
OBJS = $(patsubst %.c,%.o,$(C_SRC))
+build.o: $(H_SRC) build.c
+
IASL_VER = acpica-unix-20080729
IASL_URL = http://acpica.org/download/$(IASL_VER).tar.gz
vpath iasl $(PATH)
all: acpi.a
-ssdt_pm.h ssdt_tpm.h: %.h: %.asl
+ssdt_pm.h: ssdt_pm.asl
+ $(MAKE) iasl
+ iasl -tc $<
+ sed -i'' -re 's/AmlCode/AmlCode_PM/g' $*.hex
+ mv $*.hex $@
+ rm -f *.aml
+
+ssdt_tpm.h: ssdt_tpm.asl
$(MAKE) iasl
iasl -tc $<
+ sed -i'' -re 's/AmlCode/AmlCode_TPM/g' $*.hex
mv $*.hex $@
rm -f *.aml
make -C $(IASL_VER)/compiler
$(INSTALL_PROG) $(IASL_VER)/compiler/iasl $(DESTDIR)$(BINDIR)/iasl
+%.o: %.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+
acpi.a: $(OBJS)
$(AR) rc $@ $(OBJS)
-%.o: %.c $(H_SRC)
- $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
-
clean:
- rm -rf *.a *.o $(IASL_VER) $(IASL_VER).tar.gz
+ rm -rf *.a *.o dsdt.c ssdt_pm.h ssdt_tpm.h $(IASL_VER) $(IASL_VER).tar.gz
install: all
'xen_extended_power_mgmt': int,
'vga_passthrough' : int,
'dom0_input' : str,
+ 'xen_extended_power_mgmt': int,
}
# Xen API console 'other_config' keys.
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))
+
xen_extended_power_mgmt = int(vmConfig['platform'].get(
'xen_extended_power_mgmt', 0))
if xen_extended_power_mgmt != 0: