Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5574797imm; Wed, 12 Sep 2018 08:00:48 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaEbgGhEBmMmr/4ZFyBwNxOGLrR/nR916qeVVveLvXkKyXJ9gZp6SnUbrdDpEp3eKK01+Zp X-Received: by 2002:a17:902:9693:: with SMTP id n19-v6mr2762218plp.282.1536764448315; Wed, 12 Sep 2018 08:00:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536764448; cv=none; d=google.com; s=arc-20160816; b=m35WzYr8YabovV0MzsBtP5DXOGelTSnvwER+bZoSOHMQjX8YaPGdtTv+6WAMFa5z0E 2Xdhlp48wg15Ijwn+9K5eJiXZoCeo45wcD4oPKXY9Tjn7nkGj6z0kbbwUKL52E0MUi2b vST1VNqaq7ZBG52nzbwOy7KspnyrLCpMrWJJ4tEYkFegHuOaN0ZlfLAovd5vFd6jtzBv pXo4m+nSe07t6Vtb35/ksLUda42jw/Bucq4TrLsLd5Ne2cttCA21t8jVGY3UInNUGzSn rxemjon/JKHlsf8/Ik+CmA2Wa1R7Qy5SucUHBNGFD31rP3o+21z5SobWwLN0zEEBmoOV c52w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=+jNtaMDgvCXvxa+vyBkrOOnXlX5oEL2FiZf6uC2YQWs=; b=qrn1foBUkjkyYaaWIhdqftL9gK6oS4l/luGUnZIOcvE7A/2EAMWZjW+S3GDz3LSJ5N yhbkzvOyu9Z9El8jKxKnt+sX/6zahgKGgNifvmMYp2XJaF6PcCI3iLseZsDxYL7dcqlE SOERLDbj6LTAmxpeNx4AXmqlOgPlB2zkhwVoaOT77YVdnvX1K9IPHhUL3SG6OTJIpR0h SyYIK0fbqoB+/HmqbYxJU0cPyN7+B6FXCjfhRUzzZ6tsmvKo29vretjOU6nBMj6GRJDT Ni9QJ2s7ATB1iWqA8Kl6Qeso8YzW3kMbbPl/pXXSx2tiCBQoQQBmzaTuDPlShqtmf/A4 G/sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jtWkZigt; 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=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 d32-v6si1140759pla.93.2018.09.12.08.00.31; Wed, 12 Sep 2018 08:00:48 -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; dkim=pass header.i=@linaro.org header.s=google header.b=jtWkZigt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728013AbeILUFM (ORCPT + 99 others); Wed, 12 Sep 2018 16:05:12 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:54466 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727002AbeILUFM (ORCPT ); Wed, 12 Sep 2018 16:05:12 -0400 Received: by mail-it0-f65.google.com with SMTP id f14-v6so3432372ita.4 for ; Wed, 12 Sep 2018 08:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=+jNtaMDgvCXvxa+vyBkrOOnXlX5oEL2FiZf6uC2YQWs=; b=jtWkZigtUooLqmJR8WGs6wrgOzL1HxpXTYmMc+SV9xtq1Hey6ftU6iyasTK72ZyO/x JbdBJXeUIHG3R8cMTj0PGr0/YdUtmtQ8eLhe9P+YFmd7ibmWZ/GWNx1ogX82Ob+YY2Ro JPcstKH6L8CAAuoZ2GaJhVp14Rd2K8RWpQbUM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+jNtaMDgvCXvxa+vyBkrOOnXlX5oEL2FiZf6uC2YQWs=; b=RAGU+CeCdukuGCR/NEkBJqNM0pMEatPtdnmeINk/hIPjwrk1RVtkyoXIGcF0LTdYXr XUXJdTJGTWWmALvPuI2BabiDicochW1pKZM0p1rhrHGFR3UR3mIVEAbT3QAXJBQCalel zwM1KtdRn4l9VKJRs2Gy9B/Votxtj1IpIYokWUEqd2i/dKmxY+9/E4tNOaBJJnKy2r8U vBIjgpQkPLaw1HQpF8TVgl6PaGGB27D/wyGrcMnc9r93LmI2l9CbRRXNk45xqEER5OTe YteAp6cS8Ibcp6ooirQFsJModwtV4fGM/BQfviNRC9COiwjpN9ViTiAtm2DQ8GYRPgnu CQHQ== X-Gm-Message-State: APzg51DmDNObPSJzxIXldk64wRH/ReS59solJtKyFtebhyACVrP8ePf8 L1pHUs8dGOhKHcQiSHj+1qb5rGd+XUY1kALx06o5Fw== X-Received: by 2002:a02:1515:: with SMTP id j21-v6mr2181403jad.2.1536764417145; Wed, 12 Sep 2018 08:00:17 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:2848:0:0:0:0:0 with HTTP; Wed, 12 Sep 2018 08:00:16 -0700 (PDT) In-Reply-To: <1536423828-5693-1-git-send-email-aaron.ma@canonical.com> References: <1536423828-5693-1-git-send-email-aaron.ma@canonical.com> From: Ard Biesheuvel Date: Wed, 12 Sep 2018 17:00:16 +0200 Message-ID: Subject: Re: [PATCH] x86/efi: earlyprintk - Add 64bit efi fb address support To: Aaron Ma Cc: Thomas Gleixner , "the arch/x86 maintainers" , linux-efi , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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)