From patchwork Thu Jun 14 16:33:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 138584 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp2339447lji; Thu, 14 Jun 2018 09:37:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIlWB4DGOlyFB0/A8lrybzDCAILDL2WZ8zCtkZ6vuPvL9Qzb4TWj8iIh5ZK93DyQX3VlUF1 X-Received: by 2002:aa7:c1c5:: with SMTP id d5-v6mr3292661edp.148.1528994272863; Thu, 14 Jun 2018 09:37:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528994272; cv=none; d=google.com; s=arc-20160816; b=kH4z0cf7dmiIKROM/HuD47mWMJDnoMY6hJ4VkMeiQBscsn25aSFqXl41ropXKOewgc 6Qwg8tfWhrxPVfranzkmNIwd4Ez9VKIhQWcYeQ6H8KPBKm0UWoj5K9ThwehOS/JAiZ48 /+Gq5nqMQaZd0RTIFTxO7mVukVtNlSLxeOaEoiZx53cts/vlaq3lrgWwX7uYYp2IZEO6 wxSD2lUQu1xiC85Ba6Oq7iokpSr22WyfetSQyN5S0drM0qEUnWQTdY/gU+reeQANIrDa S/3goG/NrdEzwbJbZtyGSL0+tpZW/FeYaDGwDmZHquRt1VmlJmnVDAWPtPNonHEAwRaC HnJg== 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=NhDqBrpCkyGxZH98npKGtllQmooAZnlVyjYA0QBitaZl9PZcPzHl3sg6sDl2SQIyXQ kJvUO9V27kucwZhpawRTJZliPBn6cvrcBJG+R2nMm9kkk8WRcSRHYXqFTC55JKc+OTBR fQd0Ku9ujPLe+zdGuaES9QhzyqqLAiDfDpUbBFY7oD77qvoQaMmO7ePbB90U1rkWgkOH fbKVCA4vNKNhaGeL9C/JkSYtp+awnJUqwI29dypiDdKv24pLCVjcSi3iE+5rRUV4r7l/ xAGq4KcX1zHSUGY0F9gUA0I8ucYjuhLuEJuyzQdQfk0IBs4trjNSO5FD6GOV0bCkry7r wnCA== 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 f24-v6si2604692edj.330.2018.06.14.09.37.52; Thu, 14 Jun 2018 09:37:52 -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 65973C21E1A; Thu, 14 Jun 2018 16:34:49 +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 14180C21D83; Thu, 14 Jun 2018 16:33:40 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 15F8DC21D8A; Thu, 14 Jun 2018 16:33:35 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by lists.denx.de (Postfix) with ESMTPS id 4F9ABC21D83 for ; Thu, 14 Jun 2018 16:33: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 ACE87AF05; Thu, 14 Jun 2018 16:33:34 +0000 (UTC) From: Alexander Graf To: u-boot@lists.denx.de Date: Thu, 14 Jun 2018 18:33:25 +0200 Message-Id: <20180614163334.46827-3-agraf@suse.de> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20180614163334.46827-1-agraf@suse.de> References: <20180614163334.46827-1-agraf@suse.de> Cc: Heinrich Schuchardt Subject: [U-Boot] [PATCH 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