From patchwork Fri Apr 1 16:05:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 64882 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp819884lbc; Fri, 1 Apr 2016 09:07:54 -0700 (PDT) X-Received: by 10.182.196.97 with SMTP id il1mr3428613obc.87.1459526874546; Fri, 01 Apr 2016 09:07:54 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id oy10si7895068obb.14.2016.04.01.09.07.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Apr 2016 09:07:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org 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 1am1b6-0005Lw-PT; Fri, 01 Apr 2016 16:06:56 +0000 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1am1ab-0004da-EL for linux-arm-kernel@lists.infradead.org; Fri, 01 Apr 2016 16:06:28 +0000 Received: by mail-wm0-x22c.google.com with SMTP id p65so28767174wmp.0 for ; Fri, 01 Apr 2016 09:06:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lLU/eOvsJEwofdhQA9a1CPYCxnXFpdGImtY2uBZd74U=; b=fBt3EFzsyn21SEi2Q2qMB6vfyhwU5svlgaCEvibbFS3w9mbmLOsz9/5+NIGcod2QuB Xg+kQINY9aafn+Vqo0EB2wFKaneiJvH5vFIw8OdLBYM2VmhVJO+xgAtH0gqqhT9F4q9B ioe2YYfAt8Of0DgTmcTyqOLBe1rjv8dLGVUZQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lLU/eOvsJEwofdhQA9a1CPYCxnXFpdGImtY2uBZd74U=; b=bHnbZUFedmAwOi6Mv3NYPZ1+hNekk4kqAETad8zurqwyI1uf4Vi3h9dfu7TIyHfHHU NonDR3Q364zebchNiHZzuLwGJLxaJWZbUUooEujtWlFPHxd/bVj9NqS4AUIXz5Lhli6p /d3qvjGQQnUR8SIyswB6t9F2DQUnPLPWGf0LgRghD2GbR1VqqaruAS6f8HwXq28Yn93u WDCUC6zUK/Nemq48+5Jb7R3yKAsIpcCtvqKY5jvQLLnZ6GGz1hLI2CQjYviQoEAwk5nS nf/1mPD2TAkXxlh30hbUx3hWsxTYGlgwhGzmqyJrUAwlqYz6L+lZCKKwhX4QLi5gyUot +pVA== X-Gm-Message-State: AD7BkJKL/jhl0qyFHqjMHoUTeS2bABmv+v4OftkPL8fPxoBm6LqvfeFuaoQy/sWlIEvljk4e X-Received: by 10.28.22.74 with SMTP id 71mr4819261wmw.47.1459526765768; Fri, 01 Apr 2016 09:06:05 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id g3sm14698567wjw.31.2016.04.01.09.06.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 Apr 2016 09:06:04 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, matt@codeblueprint.co.uk Subject: [PATCH v3 5/9] efi/arm64: libstub: make screen_info accessible to the UEFI stub Date: Fri, 1 Apr 2016 18:05:31 +0200 Message-Id: <1459526735-24936-6-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1459526735-24936-1-git-send-email-ard.biesheuvel@linaro.org> References: <1459526735-24936-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160401_090625_797243_BB656BEA X-CRM114-Status: GOOD ( 12.08 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:22c listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, pjones@redhat.com, will.deacon@arm.com, Ard Biesheuvel , dh.herrmann@gmail.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Unlike on 32-bit ARM, where we need to pass the stub's version of struct screen_info to the kernel proper via a configuration table, on 64-bit ARM it simply involves making the core kernel's copy of struct screen_info visible to the stub by exposing an __efistub_ alias for it. Signed-off-by: Ard Biesheuvel --- arch/arm64/include/asm/efi.h | 3 +++ arch/arm64/kernel/efi.c | 3 +++ arch/arm64/kernel/image.h | 1 + 3 files changed, 7 insertions(+) -- 2.5.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel Acked-by: Will Deacon diff --git a/arch/arm64/include/asm/efi.h b/arch/arm64/include/asm/efi.h index bb26f2205973..ed6c85d3a583 100644 --- a/arch/arm64/include/asm/efi.h +++ b/arch/arm64/include/asm/efi.h @@ -54,6 +54,9 @@ int efi_create_mapping(struct mm_struct *mm, efi_memory_desc_t *md); #define __efi_call_early(f, ...) f(__VA_ARGS__) #define efi_is_64bit() (true) +#define alloc_screen_info(x...) &screen_info +#define free_screen_info(x...) + #define EFI_ALLOC_ALIGN SZ_64K /* diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c index b6abc852f2a1..6f4b3ea359db 100644 --- a/arch/arm64/kernel/efi.c +++ b/arch/arm64/kernel/efi.c @@ -17,6 +17,9 @@ #include +/* we will fill this structure from the stub, so don't put it in .bss */ +struct screen_info screen_info __section(.data); + int __init efi_create_mapping(struct mm_struct *mm, efi_memory_desc_t *md) { pteval_t prot_val; diff --git a/arch/arm64/kernel/image.h b/arch/arm64/kernel/image.h index 5e360ce88f10..1428849aece8 100644 --- a/arch/arm64/kernel/image.h +++ b/arch/arm64/kernel/image.h @@ -112,6 +112,7 @@ __efistub___memset = KALLSYMS_HIDE(__pi_memset); __efistub__text = KALLSYMS_HIDE(_text); __efistub__end = KALLSYMS_HIDE(_end); __efistub__edata = KALLSYMS_HIDE(_edata); +__efistub_screen_info = KALLSYMS_HIDE(screen_info); #endif