From patchwork Thu Aug 14 14:55:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 35405 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f71.google.com (mail-pa0-f71.google.com [209.85.220.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B8C6B202E4 for ; Thu, 14 Aug 2014 14:57:04 +0000 (UTC) Received: by mail-pa0-f71.google.com with SMTP id et14sf9517117pad.2 for ; Thu, 14 Aug 2014 07:57:04 -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:subject:date:message-id:cc :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=pSRG4DeNbuj7DYhhkUmI5gGcHisW8HYM1sbFCkNAMhw=; b=AbjC525vaXiXfuLxSAhHacMZMQDc5MPPJPM+AOJcde3j8Yhn6YtNgdBCiyqTnX13D8 kj9GVPyyBaeWYF5czWCesnrVUHlPBvg12TDRghRgeMRRgI+KggSeQlTuVkcMcnNq0htq Xh2mKxZv7ZXFvnpRnMcr3Kd62pNWGVjcquqScT+FyGUFoz0EVEWaX0R3thdSPQxbm/Xw lXH70nH4a8Gt7MOSc5YJpioQQgLlNQxMmpbblhxrrUQWd7We9Lp+UucDFtl1O/OJeJAA vLRUf5nWJvUPF1/aDv8I6tgLM5YEf07G8YoKuDE38rGLNcj/QK0EnqC1sGR6krV7NBoK T4kQ== X-Gm-Message-State: ALoCoQm/LQ44BXHM1daKCgjqSBHsUuXg5v64Dp9iiqSWzrwpks2QJLmzHO9h5GBhaSnULDIBUZpn X-Received: by 10.68.116.42 with SMTP id jt10mr6072043pbb.5.1408028223991; Thu, 14 Aug 2014 07:57:03 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.93.228 with SMTP id d91ls1111818qge.41.gmail; Thu, 14 Aug 2014 07:57:03 -0700 (PDT) X-Received: by 10.220.196.147 with SMTP id eg19mr1843044vcb.60.1408028223870; Thu, 14 Aug 2014 07:57:03 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id e4si2840476vdw.49.2014.08.14.07.57.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Aug 2014 07:57:03 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lf12so1541394vcb.1 for ; Thu, 14 Aug 2014 07:57:03 -0700 (PDT) X-Received: by 10.52.73.202 with SMTP id n10mr1086078vdv.86.1408028223795; Thu, 14 Aug 2014 07:57:03 -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.221.37.5 with SMTP id tc5csp40677vcb; Thu, 14 Aug 2014 07:57:03 -0700 (PDT) X-Received: by 10.68.104.66 with SMTP id gc2mr4964835pbb.17.1408028222781; Thu, 14 Aug 2014 07:57:02 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id gv10si4457253pbd.90.2014.08.14.07.57.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Aug 2014 07:57:02 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XHwRT-0000L3-D5; Thu, 14 Aug 2014 14:55:51 +0000 Received: from mail-la0-f47.google.com ([209.85.215.47]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XHwRQ-0000D7-4c for linux-arm-kernel@lists.infradead.org; Thu, 14 Aug 2014 14:55:48 +0000 Received: by mail-la0-f47.google.com with SMTP id mc6so1270166lab.34 for ; Thu, 14 Aug 2014 07:55:25 -0700 (PDT) X-Received: by 10.112.24.167 with SMTP id v7mr5457998lbf.19.1408028125240; Thu, 14 Aug 2014 07:55:25 -0700 (PDT) Received: from localhost ([195.238.92.128]) by mx.google.com with ESMTPSA id r2sm3234974lag.48.2014.08.14.07.55.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Aug 2014 07:55:24 -0700 (PDT) From: Semen Protsenko To: matt.fleming@intel.com, x86@kernel.org Subject: [PATCH] efi/arm64: store Runtime Services revision Date: Thu, 14 Aug 2014 17:55:22 +0300 Message-Id: <1408028122-1784-1-git-send-email-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.0.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140814_075548_363384_0162E5B8 X-CRM114-Status: UNSURE ( 7.73 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.47 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.47 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: linux-efi@vger.kernel.org, ard.biesheuvel@linaro.org, catalin.marinas@arm.com, leif.lindholm@linaro.org, roy.franz@linaro.org, msalter@redhat.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: semen.protsenko@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.220.170 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 "efi" global data structure contains "runtime_version" field which must be assigned in order to use it later in Runtime Services virtual calls (virt_efi_* functions). Before this patch "runtime_version" was unassigned (0), so each Runtime Service virtual call that checks revision would fail. Runtime Services revision being passed in UEFI system table from UEFI to kernel (see efi_entry() function). In UEFI it's being stored at MdePkg/Include/Uefi/UefiSpec.h as EFI_RUNTIME_SERVICES_REVISION. Signed-off-by: Semen Protsenko Acked-by: Ard Biesheuvel --- arch/arm64/kernel/efi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c index e72f310..5dbb7bd 100644 --- a/arch/arm64/kernel/efi.c +++ b/arch/arm64/kernel/efi.c @@ -463,6 +463,8 @@ static int __init arm64_enter_virtual_mode(void) efi_native_runtime_setup(); set_bit(EFI_RUNTIME_SERVICES, &efi.flags); + efi.runtime_version = efi.systab->hdr.revision; + return 0; err_unmap: