From patchwork Fri Jun 15 12:42:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 138687 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp805256lji; Fri, 15 Jun 2018 05:50:47 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKVTxBDBBj5SKoSBIXat3XJxS5SowNg05UFLQs0HdH3pW5ORxNW22on21/aqNJpzAmzUVgF X-Received: by 2002:a50:87e6:: with SMTP id 35-v6mr1777227edz.1.1529067047361; Fri, 15 Jun 2018 05:50:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529067047; cv=none; d=google.com; s=arc-20160816; b=VGMKU0xkhidFECxhcbHj4/iKAokXgSA2UFSljc8CJQfVcDuM1XurvcUi2Vek0Nsx4u zKlXKGAF+nQ/Xh7gI5JETFdp5Er1rO4nEDi4ewmG+f3nYZ4JBjJsSlozR/4cFUUg3VeG flL7KZg6xdivRNi1/Mqb0+uVVf/zGNYXFSB7bj/XcVup3AyqDA3aQ/DSPzGVAMrr9YwO OKNhd5EjXhKY5dSasb4WBEzsmHXGZy1HqkKvvEHrZ4xV+GCBEDso+CprpC0RO8+cIw3O aTggyPzNvKrtiiWoLSdGDodbrUNLjhLf5ttpapRly4kLJhsPMEWE73dKfGblI9/mCFYq F36g== 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=XSoTdkqip5aG0wId6L5oSD1Ntxh1QWMzNhUQJzNLakopZX/R6aWy4JJtk+88pfjQsE wndDYrrqMveNdEk4SsoQkd6iSriCrvnIHA9BcY0uwyQ23Q1DwGjyWLeXyKhyBfoeXuqT slXWqMO2WfAaW1GjAlwgj/67HvK+V1Jdn3+15WMgOCeV3sAdeg3aK3hpEPcKNoOfQe/P Oj+a2Y49ktEeeaxKGfSdidswPVR6G42gKLCGV2kTYLZyDm6hgxIfYQ0gSrGJ3X9hxHJM t/S1sIu+ZkNOIHkX5AEZtIscPWaJQ+bZY6Ip7GDTgGlZaeGmYgMR5+O636m8CIxI65oR /WBA== 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 d55-v6si4920486ede.97.2018.06.15.05.50.47; Fri, 15 Jun 2018 05:50:47 -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 02F97C21EA6; Fri, 15 Jun 2018 12:44:23 +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 45C3BC21EDC; Fri, 15 Jun 2018 12:42:37 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 350CEC21E29; Fri, 15 Jun 2018 12:42:32 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by lists.denx.de (Postfix) with ESMTPS id 554ADC21E2B for ; Fri, 15 Jun 2018 12:42:31 +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 DD378AF0B; Fri, 15 Jun 2018 12:42:30 +0000 (UTC) From: Alexander Graf To: u-boot@lists.denx.de Date: Fri, 15 Jun 2018 14:42:14 +0200 Message-Id: <20180615124229.35310-3-agraf@suse.de> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20180615124229.35310-1-agraf@suse.de> References: <20180615124229.35310-1-agraf@suse.de> Cc: Andy Shevchenko , Heinrich Schuchardt Subject: [U-Boot] [PATCH v3 02/17] 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