From patchwork Thu Sep 18 22:49:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roy Franz X-Patchwork-Id: 37616 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 91A922054E for ; Thu, 18 Sep 2014 22:52:23 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id cc10sf579168wib.10 for ; Thu, 18 Sep 2014 15:52:22 -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=EdDyVbJW5xX9IisT+JvGSykQc1LaptandhGgDAbR4vo=; b=m6mEXM2j18sh6AwJO9FAVLyh1VG4JKGuOTo1bIx2mi0TKu474PgUXhtfMAz8i6G/EA p17apOVp75qJ/imwRsjahuLLZz2BDMN/XP4y/Y/E4WKxBwnqYpbJGVjTxk5gFfkadgQy +YRz3XIiQIfM81c4lxRNNPsvoXWFQj6I7jpRO4uRSB4WJZe+nL+1cwFlw4KKdfSh8lfA HqqeR/jNMd2eiMDcGJNJwsvB9rhSCG0/hLjyzEjSYmklg6+vk3TMlYE+rkCJdba8zOFl mMOzfOKxlBZMQ+e3vRCuRBFdmDslC4Kq7KTyFGwY0akHOfL+34ua86KLVScRHYL7aE94 yQEg== X-Gm-Message-State: ALoCoQmQMkh5oTs6aUu6UITiz93Yju5OQml20pQbhagtmEP6xpweKSkP0NM6jgxKFazk0007Bvdo X-Received: by 10.181.8.226 with SMTP id dn2mr1364745wid.4.1411080742837; Thu, 18 Sep 2014 15:52:22 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.74 with SMTP id w10ls288126laj.99.gmail; Thu, 18 Sep 2014 15:52:22 -0700 (PDT) X-Received: by 10.112.17.2 with SMTP id k2mr2739511lbd.28.1411080742622; Thu, 18 Sep 2014 15:52:22 -0700 (PDT) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx.google.com with ESMTPS id f7si180155lab.30.2014.09.18.15.52.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Sep 2014 15:52:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by mail-la0-f54.google.com with SMTP id ge10so2035001lab.41 for ; Thu, 18 Sep 2014 15:52:22 -0700 (PDT) X-Received: by 10.112.14.33 with SMTP id m1mr2775296lbc.16.1411080742563; Thu, 18 Sep 2014 15:52:22 -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 of9csp843143lbb; Thu, 18 Sep 2014 15:52:21 -0700 (PDT) X-Received: by 10.140.20.105 with SMTP id 96mr3608991qgi.33.1411080741273; Thu, 18 Sep 2014 15:52:21 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id t95si217217qgd.14.2014.09.18.15.52.20 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 18 Sep 2014 15:52:21 -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 1XUkWq-0006IO-KI; Thu, 18 Sep 2014 22:50:20 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XUkWp-0006IC-DH for xen-devel@lists.xen.org; Thu, 18 Sep 2014 22:50:19 +0000 Received: from [193.109.254.147:17731] by server-4.bemta-14.messagelabs.com id 15/F8-01677-AA16B145; Thu, 18 Sep 2014 22:50:18 +0000 X-Env-Sender: roy.franz@linaro.org X-Msg-Ref: server-16.tower-27.messagelabs.com!1411080616!11084341!1 X-Originating-IP: [209.85.220.45] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 1842 invoked from network); 18 Sep 2014 22:50:17 -0000 Received: from mail-pa0-f45.google.com (HELO mail-pa0-f45.google.com) (209.85.220.45) by server-16.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 18 Sep 2014 22:50:17 -0000 Received: by mail-pa0-f45.google.com with SMTP id rd3so2463712pab.18 for ; Thu, 18 Sep 2014 15:50:15 -0700 (PDT) X-Received: by 10.70.133.231 with SMTP id pf7mr11457387pdb.20.1411080615832; Thu, 18 Sep 2014 15:50:15 -0700 (PDT) Received: from rfranz-t520.swisscom.com (70-35-38-154.static.wiline.com. [70.35.38.154]) by mx.google.com with ESMTPSA id ig4sm66332pbb.55.2014.09.18.15.50.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Sep 2014 15:50:15 -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: Thu, 18 Sep 2014 15:49:52 -0700 Message-Id: <1411080607-32365-2-git-send-email-roy.franz@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1411080607-32365-1-git-send-email-roy.franz@linaro.org> References: <1411080607-32365-1-git-send-email-roy.franz@linaro.org> Cc: Roy Franz , fu.wei@linaro.org Subject: [Xen-devel] [PATCH V5 01/15] 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.215.54 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 | 1 + 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, 5 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 6d725aa..1aa4a5b 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..f182df2 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -100,6 +100,7 @@ $(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 -sf $(BASEDIR)/common/efi/* 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