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@xxxxxxxxxxxxxxxxxxx> 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))