From patchwork Thu Jun 14 18:22:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 138611 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp2456247lji; Thu, 14 Jun 2018 11:28:30 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK7C5q/0XG6KWmyaRNTldGZFXf/SnuZfC8fZxVW0HDyW7IMkClGz4orx3kTz2bychK+xtuy X-Received: by 2002:a50:a5ec:: with SMTP id b41-v6mr3515310edc.147.1529000910126; Thu, 14 Jun 2018 11:28:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529000910; cv=none; d=google.com; s=arc-20160816; b=iIdHfLamAdouC89BqNL1GvqgeE6sKXPbuxoxQhT+6H5Ww+dAgsEtk2jRUcRqeRFRuZ oJiawDBeCiAKHLAePbUl4Xk0ehyd64MShXjwPP5e+Gd9oQ6/TRtKliKIgL0jONA+GqRG NX8Er5Jbm7tzZLswTYYcjQ8Msy0yd3hbF4Lzz+TxkPvQC/59TC3pHY6syM5t7jiVO+VJ 2B9sD4b/gzX+CSsX8slC6xONlGEiXYXmPDR8m4jFSL7ucx2R86aykEuLY7w90IFiEOUM Ly5FeDhV0Z781yE5j4beXbqV1xa0OmNbVQQBXokBnzjtJSL2TXojNgUADycBsnnXtVvI RN6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:arc-authentication-results; bh=97sDLf9D+o4CHkrAB/PKmm4T2GTnP3HHG/6/Xqm11Qo=; b=OI4WGlWuYo9oeCu68iYJ6S3AvEq+xMT2MLl9QS8+qgOT3MaMrKf8U57kVNWWzU1tPK cUC7zpUbtkTxSd/V2Not84ILRhO8W7wslSaZfaLqciPm5PTifL56a1Zk3OrxsWk+Eh9M i1BVr5ET4RujbD0kXRHWAMIBiBpQ8FKEea9ySh33qN0EJbC32/gmXm0+BSY/iG4t3hHa MdkgBENPdrj9wKMd1TpvNQZCu8vsK3c+5A3pVXC0MnDdWBrcdWJZiKJyOPoQE+/tE5eU KnNagus5xyjOgTZUeiMNrmk6hNrXvcbvyMINOBb7Bdx+eLng41sVkOc8tvS+TB9o4MVT lQSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id 21-v6si4700217edx.293.2018.06.14.11.28.29; Thu, 14 Jun 2018 11:28:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id AF12AC21D8E; Thu, 14 Jun 2018 18:25:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 34BE2C21D8E; Thu, 14 Jun 2018 18:22:46 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 4DA24C21C27; Thu, 14 Jun 2018 18:22:35 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by lists.denx.de (Postfix) with ESMTPS id 60094C21DA2 for ; Thu, 14 Jun 2018 18:22:35 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 9530BAFAF; Thu, 14 Jun 2018 18:22:34 +0000 (UTC) From: Alexander Graf To: u-boot@lists.denx.de Date: Thu, 14 Jun 2018 20:22:23 +0200 Message-Id: <20180614182232.78201-3-agraf@suse.de> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20180614182232.78201-1-agraf@suse.de> References: <20180614182232.78201-1-agraf@suse.de> Cc: Heinrich Schuchardt , Andy Shevchenko Subject: [U-Boot] [PATCH v2 02/11] efi: sandbox: Add relocation constants X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Simon Glass Add these so that we can build the EFI loader for sandbox. The values are for x86_64 so potentially bogus. But we don't support relocation within sandbox anyway. Signed-off-by: Simon Glass Signed-off-by: Alexander Graf --- lib/efi_loader/efi_runtime.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c index 4874eb602f..388dfb9840 100644 --- a/lib/efi_loader/efi_runtime.c +++ b/lib/efi_loader/efi_runtime.c @@ -62,6 +62,18 @@ struct dyn_sym { #define R_ABSOLUTE R_RISCV_64 #define SYM_INDEX 32 #endif + +/* For sandbox we only support 64-bit x86 at present */ +#elif defined(CONFIG_SANDBOX) +/* + * TODO(sjg@chromium.org): Consider providing a way to enable sandbox features + * based on the host architecture + */ +# ifndef __x86_64__ +# warning "sandbox EFI support is only tested on 64-bit x86" +# endif +#define R_RELATIVE 8 +#define R_MASK 0xffffffffULL #else #error Need to add relocation awareness #endif