From patchwork Thu Sep 27 08:50:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 147692 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1726388lji; Thu, 27 Sep 2018 01:51:13 -0700 (PDT) X-Google-Smtp-Source: ACcGV61f2F3qVmvZWfxAzRBAnymAUMYPPItcSgT1Ln/wZRq+qG4Sb3GyHLGSw7hHEve3UVcKi/tn X-Received: by 2002:a62:4dc1:: with SMTP id a184-v6mr10239759pfb.5.1538038273044; Thu, 27 Sep 2018 01:51:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538038273; cv=none; d=google.com; s=arc-20160816; b=r3pLDqR/6VN2cj6CiTc7HK0aDqIhLN5Py+4G1LSQrS7Kx9zo638JUK5/2ewTEB+dIJ w96qs+rgv5kLEG3yVAnZeAAFK83yB3WHhe31Q5y4bCPYNV2rcHB0RXQ4ZcBOM9LGXNWL TlgNRm60LSpOCOeeeOyF2PgG7mCapBhZgPF6JAJkslzhXpHrfqswNIlDzVlzHU8MbcHM 5WB2XBeTiEMe4mmsIuehbEaMLvf7OsN2lXQhY2WWCia4+zn7EFueY/ele7QKP/dhpM5Z yNRS4KkoiMtD9s4wIleQsb+me0Jh1vIJs3CLqSfx6yDjcUh2qUKel7+IlZwfH9iDhuW/ fEBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=G7faJzsD3RoI+9ZciyV9NwH0zlHSWtEgk++NwoeQKTU=; b=choBSCj+sz/g9uxsW0c/zK8eYcFwxdpEPJ8hBeh+yW1VAztjmbAcNiIhnyF/Z41Gr/ 8zScgsMlmbGe+f3AHYRbdHwM0aMAe840Hw/SyfAcb9gviYzkIxvHuupO1DH6Us1V1sE0 c9v75KnHHL9nw5rWeRSCqoafeS7xZ6uOQ+hekx7vFx9SoXheVy1Dq1jv3z9lhQAWlG3t 6yLSlBMJMjNUHjSUYSu4T6bUas7pICEjh9P62CQuDmhRvspd9WnW6DRobKuIt1ffaD1j yaTXVLr91eJ8++mCcq6uZ1sTgBm8HUeOEwyrQ9dhKi2sTydsS1gyRP8RFKe3Co77Dpp3 3HKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g9rl4lXw; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y14-v6si1513151plp.458.2018.09.27.01.51.12; Thu, 27 Sep 2018 01:51:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g9rl4lXw; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727462AbeI0PIU (ORCPT + 3 others); Thu, 27 Sep 2018 11:08:20 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:37044 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727342AbeI0PIT (ORCPT ); Thu, 27 Sep 2018 11:08:19 -0400 Received: by mail-wr1-f67.google.com with SMTP id u12-v6so1665440wrr.4 for ; Thu, 27 Sep 2018 01:51:10 -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=G7faJzsD3RoI+9ZciyV9NwH0zlHSWtEgk++NwoeQKTU=; b=g9rl4lXwZQBPXY7Wwn06ohS0x+uep6V+L1wUn0QOetpxa+xO/dHJQE2UgMzsKox8YF XyWpVaSsHRea0WwNl0YZzyg8ISzJ6HOw4vag761jg88XUsMWuXPbWLNixCc8LN8AdP74 hIhJD3tdYCBU1GmA6K/hl3mIdLuvbn29NXc9w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=G7faJzsD3RoI+9ZciyV9NwH0zlHSWtEgk++NwoeQKTU=; b=MN17cz+qtRgSYZHmknnrRUOLpksaT/6nWeYrRneBi1p1dp+KjHrm7txcnW6Sx0fHcb nrUI620LcK3yBqQyzYUfik7dqLRagwQAh8uMTySxEbIs4WPiTTnsObpU9s1FoSrso5fc Djn9IhQ0u8yjAEKxRKaLZvtYIcsYOpNk3cPTa/TpM5ppxTBK8ix79C68VGHKVWeA+G4F j7Qm6Jx+KVIx4BMzYvmDZGiRRbLMWWCjKw1PXketzTFO9ljkjSACCySt+dVdvdmtcQUN dc+vgWC2x2OTYMqX6dDfjc38pcFBKVllQSbBfThBRkbcDDty2qHxsH/W4pALwdexc151 NUMQ== X-Gm-Message-State: ABuFfoixcTcLkxZdrmATv9sfm7XL59jdMTa8kvTQiI3LRxyhL9xuO+Nq OYsNKPPC1qu3a3elC1m5IrZ52g== X-Received: by 2002:adf:9244:: with SMTP id 62-v6mr758366wrj.130.1538038269464; Thu, 27 Sep 2018 01:51:09 -0700 (PDT) Received: from rev03.home ([2a01:cb1d:112:6f00:546e:3c44:5966:2f5e]) by smtp.gmail.com with ESMTPSA id p11-v6sm1304055wrd.74.2018.09.27.01.51.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 01:51:08 -0700 (PDT) From: Ard Biesheuvel To: linux-kernel@vger.kernel.org, Ingo Molnar , Thomas Gleixner Cc: Ard Biesheuvel , linux-efi@vger.kernel.org, Aaron Ma , Alistair Strachan , Ben Hutchings , Bhupesh Sharma , Hans de Goede , Ivan Hu , Jeremy Linton , Marc Zyngier , Matt Fleming , Peter Robinson , Sai Praneeth Prakhya , Sebastian Andrzej Siewior , Stefan Agner Subject: [PATCH 09/11] efi/x86: earlyprintk - Add 64bit efi fb address support Date: Thu, 27 Sep 2018 10:50:36 +0200 Message-Id: <20180927085039.8391-10-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180927085039.8391-1-ard.biesheuvel@linaro.org> References: <20180927085039.8391-1-ard.biesheuvel@linaro.org> Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org From: Aaron Ma EFI GOP uses 64-bit frame buffer address in some BIOS. Add 64bit address support in efi earlyprintk. Signed-off-by: Aaron Ma Signed-off-by: Ard Biesheuvel --- arch/x86/platform/efi/early_printk.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.18.0 diff --git a/arch/x86/platform/efi/early_printk.c b/arch/x86/platform/efi/early_printk.c index 5fdacb322ceb..7476b3b097e1 100644 --- a/arch/x86/platform/efi/early_printk.c +++ b/arch/x86/platform/efi/early_printk.c @@ -26,12 +26,14 @@ static bool early_efi_keep; */ static __init int early_efi_map_fb(void) { - unsigned long base, size; + u64 base, size; if (!early_efi_keep) return 0; base = boot_params.screen_info.lfb_base; + if (boot_params.screen_info.capabilities & VIDEO_CAPABILITY_64BIT_BASE) + base |= (u64)boot_params.screen_info.ext_lfb_base << 32; size = boot_params.screen_info.lfb_size; efi_fb = ioremap(base, size); @@ -46,9 +48,11 @@ early_initcall(early_efi_map_fb); */ static __ref void *early_efi_map(unsigned long start, unsigned long len) { - unsigned long base; + u64 base; base = boot_params.screen_info.lfb_base; + if (boot_params.screen_info.capabilities & VIDEO_CAPABILITY_64BIT_BASE) + base |= (u64)boot_params.screen_info.ext_lfb_base << 32; if (efi_fb) return (efi_fb + start);