From patchwork Thu Jun 14 16:55:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 929588 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="RE8HvhDc"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 4168zT2pd8z9s01 for ; Fri, 15 Jun 2018 03:01:41 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 1B801C21DD4; Thu, 14 Jun 2018 16:57:46 +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=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID 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 1BC76C21DFD; Thu, 14 Jun 2018 16:55:51 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2C68CC21E2F; Thu, 14 Jun 2018 16:55:40 +0000 (UTC) Received: from mail-io0-f195.google.com (mail-io0-f195.google.com [209.85.223.195]) by lists.denx.de (Postfix) with ESMTPS id 637EAC21DEC for ; Thu, 14 Jun 2018 16:55:35 +0000 (UTC) Received: by mail-io0-f195.google.com with SMTP id g7-v6so7807343ioh.11 for ; Thu, 14 Jun 2018 09:55:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=5bbVRmuujN42cRcg/s84Ws95rhDSGQvfFLIY2N3hyKY=; b=RE8HvhDcQ1FWs+T9haJlgksGbrF/dqmxox784bGNPBMG5Hv9QdziDuP1a+RCfKIUYg E79FaFnB1gEO1TBcjebmBFMH5+HkwTENUR0Eve0+FWZJsoRMYEx5EdXCNte00cjfc0m1 zeZNjtWCgrHpsycmloSLAv9pCPdCZEXOYRAj8NxzDcapuMD+b7NJB8jro5iHO6gPCmSe rOCYD+6iHYN7krWSGV0A3wTnGQnVyWXIayMCG5knRAHKGbhO8g9iPQRyQBpGPhWSgK3w OxjMTuS+Yse6jM+87Xb/TkIzUdMSetQsq1NFDuBo29B6IK5U+jbRjzwFnfzX8HqDyIYM LKiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=5bbVRmuujN42cRcg/s84Ws95rhDSGQvfFLIY2N3hyKY=; b=oxP5vZd83kuopJRDpUvI+vJfHEKqURDAptAao6sqMyAZHygA7uPQxQk9c0px7jBBt5 FSlRMmxR9+8LUvMGA3jqlqf5wjw0uf8qVxdWYue0Ekjjcy39rf3JC3UyUlXr+kbNb60y AGU0K2zSpp6i6jSoQ3/1FdzILiEvSA7IusrI5GH0VaI2GslxCM8IuQ/wbX4SCHWK0+OL F+nrispizCvLtVCVsyxIiYITsj+YBf9vIQsWbkJsdaOaCeuxbVqvVWn3MN+nCylDQy1l qtZlKjIDUnXZaGTxYlXddv8I0JFtNyUQbCUpJRemMEndUTr6XISiAtY4c29pl+3jbZUx RVQw== X-Gm-Message-State: APt69E3rrQI8ZiEk6cQYSi690HR3ZcyQ7AFIpdF2whLv8tg0U/f641rQ 91Y6uONlXsq6LFMwCvn3SbPqRg== X-Google-Smtp-Source: ADUXVKJOmU19i9IE4DsE2Xv+fH+eTFqjLYd8/5OSnIFGKdr5OZacSj2FMh258Bcf+0Q/m/jNGEM2pQ== X-Received: by 2002:a6b:b8d5:: with SMTP id i204-v6mr2968402iof.284.1528995333706; Thu, 14 Jun 2018 09:55:33 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([100.67.80.24]) by smtp.gmail.com with ESMTPSA id f72-v6sm2212873iof.14.2018.06.14.09.55.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Jun 2018 09:55:32 -0700 (PDT) Received: by kiwi.bld.corp.google.com (Postfix, from userid 121222) id 3D866140498; Thu, 14 Jun 2018 10:55:30 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Thu, 14 Jun 2018 10:55:20 -0600 Message-Id: <20180614165526.183597-6-sjg@chromium.org> X-Mailer: git-send-email 2.18.0.rc1.244.gcf134e6275-goog In-Reply-To: <20180614165526.183597-1-sjg@chromium.org> References: <20180614165526.183597-1-sjg@chromium.org> Cc: Andy Shevchenko , Heinrich Schuchardt , Alexander Graf Subject: [U-Boot] [PATCH v7 05/10] 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" 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 --- Changes in v7: - Drop an unnecessary comment Changes in v6: - Warn about building sandbox EFI support on something other than __x86_64__ Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None lib/efi_loader/efi_runtime.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c index 65f2bcf140..f439223abc 100644 --- a/lib/efi_loader/efi_runtime.c +++ b/lib/efi_loader/efi_runtime.c @@ -58,6 +58,17 @@ struct dyn_sym { #define R_ABSOLUTE R_RISCV_64 #define SYM_INDEX 32 #endif + +#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