Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Matt Porter <mporter@kernel.crashing.org>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH] Fix vgacon oops on 64-bit
Date: Mon, 30 Jan 2006 23:35:36 -0700	[thread overview]
Message-ID: <20060130233536.F4971@cox.net> (raw)
In-Reply-To: <20060130181754.GA29634@linux-mips.org>; from ralf@linux-mips.org on Mon, Jan 30, 2006 at 06:17:54PM +0000

On Mon, Jan 30, 2006 at 06:17:54PM +0000, Ralf Baechle wrote:
> On Mon, Jan 30, 2006 at 08:33:21AM -0700, Matt Porter wrote:
> > +#ifdef CONFIG_64BIT
> > +#define VGA_MAP_MEM(x)	(0xffffffffb0000000UL + (unsigned long)(x))
> > +#else
> >  #define VGA_MAP_MEM(x)	(0xb0000000L + (unsigned long)(x))
> > +#endif
> 
> Looks like driving out the devil with beelzebub.  The 0xb0000000 address
> is totally platform specific and nobody ever noticed ...

Ok, added a platform dependent hook that the setup code can
configure appropriately.

Signed-off-by: Matt Porter <mporter@kernel.crashing.org>

diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index d86affa..5e01f53 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -51,6 +51,10 @@ EXPORT_SYMBOL(cpu_data);
 struct screen_info screen_info;
 #endif
 
+#ifdef CONFIG_VGA_CONSOLE
+unsigned long vgacon_remap_base;
+#endif
+
 /*
  * Despite it's name this variable is even if we don't have PCI
  */
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c
index 2209e8a..b344095 100644
--- a/arch/mips/mips-boards/malta/malta_setup.c
+++ b/arch/mips/mips-boards/malta/malta_setup.c
@@ -42,6 +42,9 @@
 #ifdef CONFIG_VT
 #include <linux/console.h>
 #endif
+#ifdef CONFIG_VGA_CONSOLE
+#include <asm/vga.h>
+#endif
 
 extern void mips_reboot_setup(void);
 extern void mips_time_init(void);
@@ -210,6 +213,12 @@ void __init plat_setup(void)
 		VIDEO_TYPE_VGAC,	/* orig-video-isVGA */
 		16			/* orig-video-points */
 	};
+
+#ifdef CONFIG_64BIT
+	vgacon_remap_base = 0xffffffffb0000000;
+#else
+	vgacon_remap_base = 0xb0000000;
+#endif
 #endif
 #endif
 
diff --git a/include/asm-mips/vga.h b/include/asm-mips/vga.h
index ca5cec9..2bedca2 100644
--- a/include/asm-mips/vga.h
+++ b/include/asm-mips/vga.h
@@ -13,7 +13,9 @@
  *	access the videoram directly without any black magic.
  */
 
-#define VGA_MAP_MEM(x)	(0xb0000000L + (unsigned long)(x))
+extern unsigned long vgacon_remap_base;
+
+#define VGA_MAP_MEM(x)	(vgacon_remap_base + (unsigned long)(x))
 
 #define vga_readb(x)	(*(x))
 #define vga_writeb(x,y)	(*(y) = (x))

      reply	other threads:[~2006-01-31  6:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-30 15:33 [PATCH] Fix vgacon oops on 64-bit Matt Porter
2006-01-30 18:17 ` Ralf Baechle
2006-01-31  6:35   ` Matt Porter [this message]

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=20060130233536.F4971@cox.net \
    --to=mporter@kernel.crashing.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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