Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5590473imm; Wed, 12 Sep 2018 08:12:12 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaOpfoB3tA5qm+SkzTttXPG6pbxWLLV9wWnGi+zX5FeRLKk9iBVbIha9tBzY4WXv3CEeFek X-Received: by 2002:a17:902:bcc6:: with SMTP id o6-v6mr2826290pls.117.1536765132078; Wed, 12 Sep 2018 08:12:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536765132; cv=none; d=google.com; s=arc-20160816; b=yS4u016Zjih+j5LJNWbS85h37h2q+/712be+tifa4fySr5vF8mRPdho0SMUTxOu8wG KOteyIPXTr7O5WGJkQefXZJZzKzEVxMgWhutMG3EI1GFTR87NLqznkn33+zgbpsWhuxC iP0eNmWLvCSdSQeY78zSC6c6Wq5K2JP8FamTG0Kag8d750+f8tVOvYM2/n/R4yE2XM/h zUZK+5IrsJ/UvA6LuLDJD4wid40zh4EKvNppV52QEwikK247UQzWX3H1R3o/gYbI3AIA hr3mF7AJTs+gJcWBUNO2xCiiCu/PF4vvf/pl5U4HgT0ylPIHEytmOa1L5x4qbn5LUckw ECTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:cc:to:subject; bh=87KoZQoN7CUsZlmMWb7WNw85kZfPneI5MxCorhtULrs=; b=hzbH4q8dm/OJjocuddpJREsq2/Lt58xLIn3lbbt8jN10Yla4E6axGrPlt9MubG4bBL KQnc0RREce1GHdu/h/k50ZSBu85ogSylHmhKbRz4mSCsWmpcqPGw/Jb8k+uoI5tG0cZ8 sliS4q4LVU9Na87VvU8Vw6wKxrASwDsoi8+WTgStDV0g3WnoYL1QH4hUMKiIoZI7OcY9 7GGZvrv70dqgkuduoFCT+ZEqUkGYPG/4CVg5DdXQIGW3jy1nNO42VBnAuUVl5fYmrLMv QGz7PZjfPrcNZWGIBLzS10K2gOtBlbV5CPBCAkVyEbfpYNYaToliD7GWf+GGwUHhHCq8 g7ug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d4-v6si1217331pla.299.2018.09.12.08.11.38; Wed, 12 Sep 2018 08:12:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726919AbeILUOW (ORCPT + 99 others); Wed, 12 Sep 2018 16:14:22 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:47109 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726640AbeILUOW (ORCPT ); Wed, 12 Sep 2018 16:14:22 -0400 Received: from [114.245.38.229] (helo=[192.168.1.10]) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1g06lf-0005Py-9p; Wed, 12 Sep 2018 15:09:24 +0000 Subject: Re: [PATCH] x86/efi: earlyprintk - Add 64bit efi fb address support To: Ard Biesheuvel Cc: Thomas Gleixner , the arch/x86 maintainers , linux-efi , Linux Kernel Mailing List References: <1536423828-5693-1-git-send-email-aaron.ma@canonical.com> From: Aaron Ma Openpgp: preference=signencrypt Message-ID: <7b08c376-2c34-d462-9d6f-2a104ca48878@canonical.com> Date: Wed, 12 Sep 2018 23:09:07 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/12/2018 11:00 PM, Ard Biesheuvel wrote: > On 8 September 2018 at 18:23, Aaron Ma wrote: >> EFI GOP uses 64-bit frame buffer address in some BIOS. >> Add 64bit address support in efi earlyprintk. >> >> Signed-off-by: Aaron Ma >> --- >> arch/x86/platform/efi/early_printk.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/arch/x86/platform/efi/early_printk.c b/arch/x86/platform/efi/early_printk.c >> index 5fdacb322ceb..c0ae25f59acd 100644 >> --- a/arch/x86/platform/efi/early_printk.c >> +++ b/arch/x86/platform/efi/early_printk.c >> @@ -32,6 +32,8 @@ static __init int early_efi_map_fb(void) >> 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); >> >> @@ -49,6 +51,8 @@ static __ref void *early_efi_map(unsigned long start, unsigned long len) >> unsigned long 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); > Please fix this in a way that works on 32-bit x86/PAE as well (i.e., > use a suitable type for base) > Right, I will send a v2 patch. Thanks, Aaron