From: Alex Williamson <alex.williamson@hp.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-ia64-devel@lists.xensource.com,
xen-devel@lists.xensource.com,
Hollis Blanchard <hollisb@us.ibm.com>,
xen-ppc-devel@lists.xensource.com
Subject: Re: Re: [XenPPC] [PATCH] [POWERPC] fix vga.c compilation
Date: Wed, 16 Aug 2006 08:48:43 -0600 [thread overview]
Message-ID: <1155739723.7966.25.camel@lappy> (raw)
In-Reply-To: <C108E936.F50%Keir.Fraser@cl.cam.ac.uk>
On Wed, 2006-08-16 at 15:24 +0100, Keir Fraser wrote:
> Actually I'm not sure this is particularly necessary for headless x86
> either. I could move the test to the end of setup_vga(), and only probe
> 0xb8000?
Hi Keir,
Yeah, I think something like the below change to your previous patch
would be fine. Thanks!
Alex
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
---
diff -r aa9ed07f34a5 xen/drivers/video/vga.c
--- a/xen/drivers/video/vga.c Wed Aug 16 08:38:18 2006 -0600
+++ b/xen/drivers/video/vga.c Wed Aug 16 08:46:30 2006 -0600
@@ -321,45 +321,6 @@ static int detect_video(void *video_base
return video_found;
}
-static int detect_vga(void)
-{
- int detected;
- void *p;
-
- if ( memory_is_conventional_ram(0xA0000) )
- return 0;
-
- /*
- * Look at a number of well-known locations. Even if video is not at
- * 0xB8000 right now, it will appear there when we set up text mode 3.
- *
- * We assume if there is any sign of a video adaptor then it is at least
- * VGA-compatible (surely noone runs CGA, EGA, .... these days?).
- *
- * These checks are basically to detect headless server boxes.
- */
-
- p = ioremap(0xA0000, 0x1000);
- detected = detect_video(p);
- iounmap(p);
- if ( detected )
- return 1;
-
- p = ioremap(0xB0000, 0x1000);
- detected = detect_video(p);
- iounmap(p);
- if ( detected )
- return 1;
-
- p = ioremap(0xB8000, 0x1000);
- detected = detect_video(p);
- iounmap(p);
- if ( detected )
- return 1;
-
- return 0;
-}
-
/* This is actually code from vgaHWRestore in an old version of XFree86 :-) */
void *setup_vga(void)
{
@@ -378,9 +339,10 @@ void *setup_vga(void)
0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x0c, 0x00, 0x0f, 0x08, 0x00
};
- int i, j;
-
- if ( !detect_vga() )
+ int i, j, detected;
+ void *p;
+
+ if ( memory_is_conventional_ram(0xA0000) )
{
printk("No VGA adaptor detected!\n");
return NULL;
@@ -407,6 +369,12 @@ void *setup_vga(void)
inb(VGA_IS1_RC);
outb(0x20, VGA_ATT_IW);
+
+ p = ioremap(0xB8000, 0x1000);
+ detected = detect_video(p);
+ iounmap(p);
+ if ( !detected )
+ return NULL;
return ioremap(0xB8000, 0x8000);
}
next prev parent reply other threads:[~2006-08-16 14:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-15 23:08 [PATCH] [POWERPC] fix vga.c compilation Hollis Blanchard
2006-08-16 0:03 ` Alex Williamson
2006-08-16 0:30 ` [XenPPC] " Hollis Blanchard
2006-08-16 9:15 ` Keir Fraser
2006-08-16 10:49 ` Keir Fraser
2006-08-16 13:59 ` Alex Williamson
2006-08-16 14:24 ` [Xen-devel] " Keir Fraser
2006-08-16 14:48 ` Alex Williamson [this message]
2006-08-16 15:35 ` Hollis Blanchard
2006-08-16 15:40 ` [Xen-devel] " Keir Fraser
2006-08-16 16:10 ` Hollis Blanchard
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=1155739723.7966.25.camel@lappy \
--to=alex.williamson@hp.com \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=hollisb@us.ibm.com \
--cc=xen-devel@lists.xensource.com \
--cc=xen-ia64-devel@lists.xensource.com \
--cc=xen-ppc-devel@lists.xensource.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.