From: Aaron Ma <aaron.ma@canonical.com>
To: ard.biesheuvel@linaro.org, tglx@linutronix.de, x86@kernel.org,
linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
aaron.ma@canonical.com
Subject: [PATCH v2] x86/efi: earlyprintk - Add 64bit efi fb address support
Date: Thu, 13 Sep 2018 02:00:08 +0800 [thread overview]
Message-ID: <1536775208-8064-1-git-send-email-aaron.ma@canonical.com> (raw)
In-Reply-To: <1536423828-5693-1-git-send-email-aaron.ma@canonical.com>
EFI GOP uses 64-bit frame buffer address in some BIOS.
Add 64bit address support in efi earlyprintk.
V2:
Fix type of address.
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
---
arch/x86/platform/efi/early_printk.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
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);
--
2.17.1
next prev parent reply other threads:[~2018-09-12 18:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-08 16:23 [PATCH] " Aaron Ma
2018-09-10 7:20 ` Ingo Molnar
2018-09-12 15:00 ` Ard Biesheuvel
2018-09-12 15:09 ` Aaron Ma
2018-09-12 18:00 ` Aaron Ma [this message]
2018-09-12 18:39 ` [PATCH v2] " Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1536775208-8064-1-git-send-email-aaron.ma@canonical.com \
--to=aaron.ma@canonical.com \
--cc=ard.biesheuvel@linaro.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®