From: Matt Fleming <matt@console-pimps.org>
To: linux-kernel@vger.kernel.org
Cc: linux-efi@vger.kernel.org, Matt Fleming <matt.fleming@intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Matthew Garrett <mjg@redhat.com>, Olof Johansson <olof@lixom.net>,
Peter Jones <pjones@redhat.com>, Ingo Molnar <mingo@kernel.org>
Subject: [PATCH] x86: Switch to vga console only if framebuffer details are missing
Date: Mon, 17 Sep 2012 11:29:08 +0100 [thread overview]
Message-ID: <1347877748-11766-1-git-send-email-matt@console-pimps.org> (raw)
From: Matt Fleming <matt.fleming@intel.com>
The efi_enabled variable has come to mean "Do we have EFI runtime
services available?". However, lack of EFI runtime services does not
mean that we should switch to using the VGA console. Provided that the
boot loader passed the dimensions of the EFI framebuffer there is no
reason we can't use efifb.
There's also no reason to check the memory type of 0xa0000 - whether
or not that memory region is EFI_CONVENTIONAL_MEMORY is immaterial -
the EFI framebuffer device will still work, and checking the EFI
memory type of a memory region on a non-EFI machine is illogical.
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Olof Johansson <olof@lixom.net>
Cc: Peter Jones <pjones@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
---
arch/x86/kernel/setup.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index f4b9b80..29dc30a 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -1021,7 +1021,7 @@ void __init setup_arch(char **cmdline_p)
#ifdef CONFIG_VT
#if defined(CONFIG_VGA_CONSOLE)
- if (!efi_enabled || (efi_mem_type(0xa0000) != EFI_CONVENTIONAL_MEMORY))
+ if (!screen_info.lfb_base || !screen_info.lfb_size)
conswitchp = &vga_con;
#elif defined(CONFIG_DUMMY_CONSOLE)
conswitchp = &dummy_con;
--
1.7.4.4
next reply other threads:[~2012-09-17 10:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-17 10:29 Matt Fleming [this message]
2012-09-17 11:00 ` [PATCH] x86: Switch to vga console only if framebuffer details are missing Alan Cox
2012-09-17 11:03 ` Matt Fleming
2012-10-10 13:43 ` Matt Fleming
2012-10-10 14:32 ` Peter Jones
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=1347877748-11766-1-git-send-email-matt@console-pimps.org \
--to=matt@console-pimps.org \
--cc=hpa@zytor.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.fleming@intel.com \
--cc=mingo@kernel.org \
--cc=mjg@redhat.com \
--cc=olof@lixom.net \
--cc=pjones@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.