From patchwork Thu Sep 25 01:42:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roy Franz X-Patchwork-Id: 37874 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4AE1120063 for ; Thu, 25 Sep 2014 01:44:19 +0000 (UTC) Received: by mail-wg0-f71.google.com with SMTP id y10sf4173763wgg.2 for ; Wed, 24 Sep 2014 18:44:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :list-archive:content-type:content-transfer-encoding; bh=Q8LyJik9x1STI1ajsLN9cpzyhO6f+NdtjYQeykYmJgg=; b=KBgqBtJDxJH8jPXSENvs+wGwlIii8/i5SKkAmxCkC4ODyhrlyCSVMtqMq92JQa7JKw lpKffnQYFwdw4FCENWHfs2Uf9wqWBJl66uY1K70kUA9c8fP4Frjkf2dyMgFosD/YRcdy 8501SeRLYqMoJtHsZNKMjKe+L3Nkc11s8RbNlmL4vLse+m+amxPnC6NObTtq9azKQnuk GxSynojWeu6qvTy2aFcWPSqcB8ggeP9CmP+sltDGnBLseYE3RXDuPUEM453pO8r11tqU LzSN8Sn2WowRCqVRFD9P5qPH3Ty9BMjDRW88Nb4AHT6l/VOtXZECjUU30qqjFhXLbkxj Ny2g== X-Gm-Message-State: ALoCoQkJcNReNa3b2xrz2W0kI6PbfpDxhHg7ocWRckjyLbwielIHYX8xWeUOvi1euMHc2bwW/NsE X-Received: by 10.152.4.4 with SMTP id g4mr1572595lag.2.1411609458473; Wed, 24 Sep 2014 18:44:18 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.6.38 with SMTP id cr6ls197369lad.17.gmail; Wed, 24 Sep 2014 18:44:18 -0700 (PDT) X-Received: by 10.152.202.135 with SMTP id ki7mr6207741lac.16.1411609458285; Wed, 24 Sep 2014 18:44:18 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com [209.85.217.180]) by mx.google.com with ESMTPS id j10si916681laf.95.2014.09.24.18.44.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 24 Sep 2014 18:44:18 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by mail-lb0-f180.google.com with SMTP id b12so11801696lbj.11 for ; Wed, 24 Sep 2014 18:44:18 -0700 (PDT) X-Received: by 10.152.22.137 with SMTP id d9mr9893974laf.29.1411609458194; Wed, 24 Sep 2014 18:44:18 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.130.169 with SMTP id of9csp678188lbb; Wed, 24 Sep 2014 18:44:17 -0700 (PDT) X-Received: by 10.52.146.17 with SMTP id sy17mr7150062vdb.29.1411609455233; Wed, 24 Sep 2014 18:44:15 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id ma7si443187vcb.67.2014.09.24.18.44.14 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 24 Sep 2014 18:44:15 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XWy53-0000vI-Je; Thu, 25 Sep 2014 01:42:49 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XWy51-0000uN-Ak for xen-devel@lists.xen.org; Thu, 25 Sep 2014 01:42:47 +0000 Received: from [85.158.137.68:26301] by server-3.bemta-3.messagelabs.com id 2D/3B-22751-61373245; Thu, 25 Sep 2014 01:42:46 +0000 X-Env-Sender: roy.franz@linaro.org X-Msg-Ref: server-5.tower-31.messagelabs.com!1411609364!11904222!1 X-Originating-IP: [209.85.213.176] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 6.12.2; banners=-,-,- X-VirusChecked: Checked Received: (qmail 21387 invoked from network); 25 Sep 2014 01:42:45 -0000 Received: from mail-ig0-f176.google.com (HELO mail-ig0-f176.google.com) (209.85.213.176) by server-5.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 25 Sep 2014 01:42:45 -0000 Received: by mail-ig0-f176.google.com with SMTP id hn15so7646283igb.3 for ; Wed, 24 Sep 2014 18:42:44 -0700 (PDT) X-Received: by 10.42.50.212 with SMTP id b20mr12561251icg.42.1411609364060; Wed, 24 Sep 2014 18:42:44 -0700 (PDT) Received: from rfranz-v430.caveonetworks.com (64.2.3.195.ptr.us.xo.net. [64.2.3.195]) by mx.google.com with ESMTPSA id x9sm5829238igl.10.2014.09.24.18.42.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Sep 2014 18:42:43 -0700 (PDT) From: Roy Franz To: xen-devel@lists.xen.org, ian.campbell@citrix.com, stefano.stabellini@citrix.com, tim@xen.org, jbeulich@suse.com, keir@xen.org Date: Wed, 24 Sep 2014 18:42:20 -0700 Message-Id: <1411609352-24549-3-git-send-email-roy.franz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1411609352-24549-1-git-send-email-roy.franz@linaro.org> References: <1411609352-24549-1-git-send-email-roy.franz@linaro.org> Cc: Roy Franz , fu.wei@linaro.org Subject: [Xen-devel] [PATCH for-4.5 V7 02/14] move x86 EFI boot/runtime code to common/efi X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: roy.franz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: This moves the EFI boot and runtime services code to the common/efi directory. This code is symbolicly linked back into the arch/x86/efi directory where it is built if a build-time check for PE/COFF support in the toolchain passes. In the PE/COFF supporting case, both the EFI executable and the normal Xen image (with stubbed EFI functions) are built. We can't use the normal common build infrastructure since we are building two versions at the same time, with different EFI related code in each. No code changes, just file movement and make updates. The files are symbolicly linked at build time back toe the original arch/x86/efi directory. This is in preparation for adding ARM EFI support where much of these files can be shared. Signed-off-by: Roy Franz --- .gitignore | 4 ++++ xen/Makefile | 3 +++ xen/{arch/x86 => common}/efi/boot.c | 0 xen/{arch/x86 => common}/efi/compat.c | 0 xen/{arch/x86 => common}/efi/efi.h | 0 xen/{arch/x86 => common}/efi/runtime.c | 0 6 files changed, 7 insertions(+) rename xen/{arch/x86 => common}/efi/boot.c (100%) rename xen/{arch/x86 => common}/efi/compat.c (100%) rename xen/{arch/x86 => common}/efi/efi.h (100%) rename xen/{arch/x86 => common}/efi/runtime.c (100%) diff --git a/xen/arch/x86/efi/boot.c b/xen/common/efi/boot.c similarity index 100% rename from xen/arch/x86/efi/boot.c rename to xen/common/efi/boot.c diff --git a/xen/arch/x86/efi/compat.c b/xen/common/efi/compat.c similarity index 100% rename from xen/arch/x86/efi/compat.c rename to xen/common/efi/compat.c diff --git a/xen/arch/x86/efi/efi.h b/xen/common/efi/efi.h similarity index 100% rename from xen/arch/x86/efi/efi.h rename to xen/common/efi/efi.h diff --git a/xen/arch/x86/efi/runtime.c b/xen/common/efi/runtime.c similarity index 100% rename from xen/arch/x86/efi/runtime.c rename to xen/common/efi/runtime.c diff --git a/.gitignore b/.gitignore index 8e34b85..35e4147 100644 --- a/.gitignore +++ b/.gitignore @@ -254,6 +254,10 @@ xen/arch/x86/efi.lds xen/arch/x86/efi/check.efi xen/arch/x86/efi/disabled xen/arch/x86/efi/mkreloc +xen/arch/x86/efi/boot.c +xen/arch/x86/efi/runtime.c +xen/arch/x86/efi/compat.c +xen/arch/x86/efi/efi.h xen/ddb/* xen/include/headers.chk xen/include/asm diff --git a/xen/Makefile b/xen/Makefile index 0e58bce..04f72e6 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -100,6 +100,9 @@ $(TARGET): delete-unfresh-files $(MAKE) -C tools $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm + [ -e arch/$(TARGET_ARCH)/efi ] && for f in boot.c runtime.c compat.c efi.h;\ + do ln -nsf ../../../common/efi/$$f arch/$(TARGET_ARCH)/efi/; done;\ + /bin/true $(MAKE) -f $(BASEDIR)/Rules.mk -C include $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) asm-offsets.s $(MAKE) -f $(BASEDIR)/Rules.mk include/asm-$(TARGET_ARCH)/asm-offsets.h