From patchwork Wed Sep 24 05:02:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roy Franz X-Patchwork-Id: 37783 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f200.google.com (mail-we0-f200.google.com [74.125.82.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 80DB820792 for ; Wed, 24 Sep 2014 05:05:12 +0000 (UTC) Received: by mail-we0-f200.google.com with SMTP id w62sf2429742wes.3 for ; Tue, 23 Sep 2014 22:05:11 -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=zjWVF2cjl5mpyLVwIcLPrLyZSDL7DZuU7hOHGTbcMeI=; b=ZTU9WCQhPjj6mN1Gw8swtK1OU7XeBTBa7kIULh1vA7ijhmW6SWWdF0J6eu+MV8wuFh 6sK46BVyFoKv6EP1oVDwEMTY/0Eo5XvunJReGbWc3062U5mBmGvA/ai+uHLNJ50txMEq 8KAC84lbIB8iG6Fq7xnQ88vCGpxs98uSJV//dwFrSklNWAMmLbjOh0BUAVGlV08OO4pb yzLX5YsxMIcidXRaUyDoP4AVt5fIpyvdABZZv5ybSkV00M2OBqoXGEP/QzUnxzWqTqdV dwbhoglmRders1MPO0UFg3xDPvs7f58nV3KSfBtONmBVkVbhFoic57BMKmOO4tDNq6yQ J4cQ== X-Gm-Message-State: ALoCoQl8+fLRpAnpMYWHE9IqgQEwyg6EvCLUze+aHh54jD0CFkaPY8fDwAjabYcYDHnv6HXUzexo X-Received: by 10.180.109.194 with SMTP id hu2mr1098540wib.1.1411535111739; Tue, 23 Sep 2014 22:05:11 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.226 with SMTP id v2ls119151lav.50.gmail; Tue, 23 Sep 2014 22:05:11 -0700 (PDT) X-Received: by 10.112.219.71 with SMTP id pm7mr3672561lbc.3.1411535111354; Tue, 23 Sep 2014 22:05:11 -0700 (PDT) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com [209.85.217.179]) by mx.google.com with ESMTPS id l2si21236803lag.111.2014.09.23.22.05.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Sep 2014 22:05:11 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by mail-lb0-f179.google.com with SMTP id 10so9319965lbg.38 for ; Tue, 23 Sep 2014 22:05:11 -0700 (PDT) X-Received: by 10.152.246.6 with SMTP id xs6mr3958187lac.56.1411535111241; Tue, 23 Sep 2014 22:05:11 -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 of9csp526217lbb; Tue, 23 Sep 2014 22:05:10 -0700 (PDT) X-Received: by 10.52.128.104 with SMTP id nn8mr3087527vdb.50.1411535103729; Tue, 23 Sep 2014 22:05:03 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id k14si5294663vdf.14.2014.09.23.22.05.03 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 23 Sep 2014 22:05:03 -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 1XWejj-0006F4-Hd; Wed, 24 Sep 2014 05:03:31 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XWejh-0006EP-SE for xen-devel@lists.xen.org; Wed, 24 Sep 2014 05:03:30 +0000 Received: from [193.109.254.147:27369] by server-6.bemta-14.messagelabs.com id 10/89-01867-1A052245; Wed, 24 Sep 2014 05:03:29 +0000 X-Env-Sender: roy.franz@linaro.org X-Msg-Ref: server-6.tower-27.messagelabs.com!1411535006!12607938!1 X-Originating-IP: [209.85.213.174] 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 14231 invoked from network); 24 Sep 2014 05:03:28 -0000 Received: from mail-ig0-f174.google.com (HELO mail-ig0-f174.google.com) (209.85.213.174) by server-6.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 24 Sep 2014 05:03:28 -0000 Received: by mail-ig0-f174.google.com with SMTP id r10so5905684igi.7 for ; Tue, 23 Sep 2014 22:03:26 -0700 (PDT) X-Received: by 10.50.117.65 with SMTP id kc1mr9642019igb.34.1411535006651; Tue, 23 Sep 2014 22:03:26 -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 ig9sm3477662igb.13.2014.09.23.22.03.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Sep 2014 22:03:25 -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: Tue, 23 Sep 2014 22:02:59 -0700 Message-Id: <1411534992-27443-2-git-send-email-roy.franz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1411534992-27443-1-git-send-email-roy.franz@linaro.org> References: <1411534992-27443-1-git-send-email-roy.franz@linaro.org> Cc: Roy Franz , fu.wei@linaro.org Subject: [Xen-devel] [PATCH for-4.5 V6 01/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.179 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 | 4 ++++ 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, 8 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..d3c9bf2 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -100,6 +100,10 @@ $(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 ] && ln -nsf ../../../common/efi/boot.c arch/$(TARGET_ARCH)/efi/;\ + ln -nsf ../../../common/efi/runtime.c arch/$(TARGET_ARCH)/efi/;\ + ln -nsf ../../../common/efi/compat.c arch/$(TARGET_ARCH)/efi/;\ + ln -nsf ../../../common/efi/efi.h arch/$(TARGET_ARCH)/efi/; $(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