From patchwork Thu Feb 25 14:56:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 8424191 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4A2BFC0553 for ; Thu, 25 Feb 2016 14:59:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7A6DB2026F for ; Thu, 25 Feb 2016 14:59:45 +0000 (UTC) Received: from lists.xen.org (unknown [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5466C20204 for ; Thu, 25 Feb 2016 14:59:44 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1aYxLv-0001T3-Jx; Thu, 25 Feb 2016 14:57:15 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1aYxLu-0001RO-5K for xen-devel@lists.xen.org; Thu, 25 Feb 2016 14:57:14 +0000 Received: from [193.109.254.147] by server-4.bemta-14.messagelabs.com id 0B/7A-03301-9461FC65; Thu, 25 Feb 2016 14:57:13 +0000 X-Env-Sender: prvs=85652c963=anthony.perard@citrix.com X-Msg-Ref: server-16.tower-27.messagelabs.com!1456412231!26664967!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 12987 invoked from network); 25 Feb 2016 14:57:12 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-16.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 25 Feb 2016 14:57:12 -0000 X-IronPort-AV: E=Sophos;i="5.22,498,1449532800"; d="scan'208";a="334491059" From: Anthony PERARD To: Date: Thu, 25 Feb 2016 14:56:02 +0000 Message-ID: <1456412174-20162-5-git-send-email-anthony.perard@citrix.com> X-Mailer: git-send-email 2.7.1 In-Reply-To: <1456412174-20162-1-git-send-email-anthony.perard@citrix.com> References: <1456412174-20162-1-git-send-email-anthony.perard@citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Anthony PERARD , Andrew Cooper , Wei Liu , Stefano Stabellini Subject: [Xen-devel] [PATCH v3 04/16] firmware/makefile: install BIOS and ACPI blob ... X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ... into the firmware directory, along with hvmloader. This introduce a rules for dsdt_anycpu_qemu_xen.aml, and change the rule for dsdt_anycpu_qemu_xen.c to temporarly generate both .c and .aml. The generation of dsdt_anycpu_qemu_xen.c will go away in a future patch. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Change in V3: - do not check if ROMs file exist before installing, they should exist - change rules for dsdt_anycpu_qemu_xen.c in oder to generate both .c and .aml files without changing temporarly the other dsdt_*.c rules. --- .gitignore | 1 + tools/firmware/Makefile | 15 +++++++++++++++ tools/firmware/hvmloader/acpi/Makefile | 11 +++++++++-- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 91f690c..abd0dce 100644 --- a/.gitignore +++ b/.gitignore @@ -127,6 +127,7 @@ tools/firmware/hvmloader/acpi/mk_dsdt tools/firmware/hvmloader/acpi/dsdt*.c tools/firmware/hvmloader/acpi/dsdt_*.asl tools/firmware/hvmloader/acpi/ssdt_*.h +tools/firmware/hvmloader/acpi/dsdt_anycpu_qemu_xen.aml tools/firmware/hvmloader/hvmloader tools/firmware/hvmloader/roms.h tools/firmware/hvmloader/roms.inc diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile index 6cc86ce..aa1ab54 100644 --- a/tools/firmware/Makefile +++ b/tools/firmware/Makefile @@ -19,6 +19,10 @@ SUBDIRS-y += hvmloader LD32BIT-$(CONFIG_FreeBSD) := LD32BIT_FLAG=-melf_i386_fbsd +SEABIOS_ROM := seabios-dir/out/bios.bin +OVMF_ROM := ovmf-dir/ovmf.bin +ACPI_TABLE_QEMU_PC_I440FX = hvmloader/acpi/dsdt_anycpu_qemu_xen.aml + ovmf-dir: GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh $(OVMF_UPSTREAM_URL) $(OVMF_UPSTREAM_REVISION) ovmf-dir cp ovmf-makefile ovmf-dir/Makefile; @@ -45,6 +49,17 @@ endif install: all [ -d $(INST_DIR) ] || $(INSTALL_DIR) $(INST_DIR) [ ! -e $(TARGET) ] || $(INSTALL_DATA) $(TARGET) $(INST_DIR) +ifeq ($(CONFIG_SEABIOS),y) +ifeq ($(SEABIOS_PATH),) + $(INSTALL_DATA) $(SEABIOS_ROM) $(INST_DIR)/seabios.bin +endif +endif +ifeq ($(CONFIG_OVMF),y) +ifeq ($(OVMF_PATH),) + $(INSTALL_DATA) $(OVMF_ROM) $(INST_DIR)/ovmf.bin +endif +endif + $(INSTALL_DATA) $(ACPI_TABLE_QEMU_PC_I440FX) $(INST_DIR) .PHONY: clean clean: subdirs-clean diff --git a/tools/firmware/hvmloader/acpi/Makefile b/tools/firmware/hvmloader/acpi/Makefile index d3e882a..a3041d3 100644 --- a/tools/firmware/hvmloader/acpi/Makefile +++ b/tools/firmware/hvmloader/acpi/Makefile @@ -23,7 +23,7 @@ OBJS = $(patsubst %.c,%.o,$(C_SRC)) CFLAGS += $(CFLAGS_xeninclude) vpath iasl $(PATH) -all: acpi.a +all: acpi.a dsdt_anycpu_qemu_xen.aml ssdt_s3.h ssdt_s4.h ssdt_pm.h ssdt_tpm.h: %.h: %.asl iasl iasl -vs -p $* -tc $< @@ -42,12 +42,19 @@ dsdt_%cpu.asl: dsdt.asl mk_dsdt awk 'NR > 1 {print s} {s=$$0}' $< > $@ ./mk_dsdt --debug=$(debug) --maxcpu $* >> $@ -$(filter dsdt_%.c,$(C_SRC)): %.c: iasl %.asl +$(filter dsdt_%cpu.c,$(C_SRC)): %.c: iasl %.asl iasl -vs -p $* -tc $*.asl sed -e 's/AmlCode/$*/g' $*.hex >$@ echo "int $*_len=sizeof($*);" >>$@ rm -f $*.aml $*.hex +dsdt_anycpu_qemu_xen.c: dsdt_anycpu_qemu_xen.aml +dsdt_anycpu_qemu_xen.aml: %.aml: iasl %.asl + iasl -vs -p $* -tc $*.asl + sed -e 's/AmlCode/$*/g' $*.hex >$*.c + echo "int $*_len=sizeof($*);" >>$*.c + rm -f $*.hex + iasl: @echo @echo "ACPI ASL compiler (iasl) is needed"