On Thu, 2012-02-02 at 13:28 +0000, Julian Pidancet wrote:
> On Wed, Feb 1, 2012 at 4:04 AM, Kevin O'Connor <kevin(a)koconnor.net> wrote:
> > On Mon, Jan 30, 2012 at 01:55:54PM +0000, julian.pidancet(a)gmail.com wrote:
> >> From: Julian Pidancet <julian.pidancet(a)citrix.com>
> >>
> >> This patch enables the VGAHOOKS config option if the BIOS is configured
> >> for Xen.
> >> In the Xen VGA passthrough case, the option ROM can be extracted from
> >> the physical device by hvmloader and pre-deployed for seabios. This
> >> patch also allows setting up VGA hooks in case the VGA option ROM is
> >> already deployed by hvmloader.
> >
> > This seems a bit odd - if option roms are deployed, how can seabios
> > reliably find the vga device? Wouldn't it be simpler to just use
> > seabios in non-optionrom-deployed mode? (After all, wouldn't seabios
> > still be able to pull the roms even if hvmloader alread did?)
> >
>
> I think you're right, I just checked the sources of hvmloader in
> xen-unstable, and it seems the option roms are only pre-deployed when
> using rombios instead of seabios.
That's correct. When Xen uses SeaBIOS we let it take care of the option
ROMs.
Ian.
--
Ian Campbell
"All Bibles are man-made."
-- Thomas Edison
On Mon, Jan 30, 2012 at 01:55:54PM +0000, julian.pidancet(a)gmail.com wrote:
> From: Julian Pidancet <julian.pidancet(a)citrix.com>
>
> This patch enables the VGAHOOKS config option if the BIOS is configured
> for Xen.
> In the Xen VGA passthrough case, the option ROM can be extracted from
> the physical device by hvmloader and pre-deployed for seabios. This
> patch also allows setting up VGA hooks in case the VGA option ROM is
> already deployed by hvmloader.
This seems a bit odd - if option roms are deployed, how can seabios
reliably find the vga device? Wouldn't it be simpler to just use
seabios in non-optionrom-deployed mode? (After all, wouldn't seabios
still be able to pull the roms even if hvmloader alread did?)
-Kevin
Some additional changes. Things should be about to wind down on the
vgabios front. Cirrus should be about done. For bochsvga, only vbe
functions 04/08 remain to be ported. (Per Gerd's feedback, I don't
think it's worth porting the 32bit vbe interface.)
-Kevin
Kevin O'Connor (6):
vgabios: Compare PCI ids against pci rom struct instead of config
settings.
vgabios: Fix linelength calculations in bochsvga and vbe.
vgabios: Rework bochsvga mode switching.
vgabios: Simplify cirrus find mode code.
vgabios: Minor - organize cirrus code so like functions are near each
other.
vgabios: Move bocshvga mode checking from runtime to init.
vgasrc/bochsvga.c | 206 +++++++++++++++++-------------------------
vgasrc/bochsvga.h | 4 +-
vgasrc/clext.c | 255 +++++++++++++++++++++-------------------------------
vgasrc/clext.h | 4 +-
vgasrc/vbe.c | 13 +--
vgasrc/vgabios.c | 6 +-
6 files changed, 199 insertions(+), 289 deletions(-)
--
1.7.6.4
On Wed, Feb 01, 2012 at 04:03:24PM +0000, julian.pidancet(a)gmail.com wrote:
> From: Julian Pidancet <julian.pidancet(a)citrix.com>
>
> Introduce CONFIG_DEBUG_IO_PORT config option which allow user
> to choose on which port to send debug on at configure time.
>
> Bochs users are likely to use 0x402 (default) for debugging purposes,
> whereas Xen uses 0xe9, as IO port address.
Thanks - I've added it to my queue.
-Kevin
From: Julian Pidancet <julian.pidancet(a)citrix.com>
Introduce CONFIG_DEBUG_IO_PORT config option which allow user
to choose on which port to send debug on at configure time.
Bochs users are likely to use 0x402 (default) for debugging purposes,
whereas Xen uses 0xe9, as IO port address.
v2: Typo.
Signed-off-by: Julian Pidancet <julian.pidancet(a)citrix.com>
---
src/Kconfig | 18 ++++++++++++++++++
src/output.c | 4 ++--
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/src/Kconfig b/src/Kconfig
index 9ea48bb..f57899b 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -348,4 +348,22 @@ menu "Debugging"
default 0x3f8
help
Base port for serial - generally 0x3f8, 0x2f8, 0x3e8, or 0x2e8.
+
+ config DEBUG_IO
+ depends on !COREBOOT && DEBUG_LEVEL != 0
+ bool "Special IO port debugging"
+ default y
+ help
+ Some emulators or hypervisors provide with a way to output debug
+ information by outputing strings in a special port present in the
+ IO space.
+
+ config DEBUG_IO_PORT
+ depends on DEBUG_IO
+ hex "Debug IO port address"
+ default 0x0402
+ help
+ Bochs uses the 0x0402 address by default, whereas Xen
+ makes the 0xe9 IO address available for guests use.
+
endmenu
diff --git a/src/output.c b/src/output.c
index 462ffb7..bdde7cc 100644
--- a/src/output.c
+++ b/src/output.c
@@ -75,9 +75,9 @@ putc_debug(struct putcinfo *action, char c)
{
if (! CONFIG_DEBUG_LEVEL)
return;
- if (! CONFIG_COREBOOT)
+ if (CONFIG_DEBUG_IO)
// Send character to debug port.
- outb(c, PORT_BIOS_DEBUG);
+ outb(c, CONFIG_DEBUG_IO_PORT);
if (c == '\n')
debug_serial('\r');
debug_serial(c);
--
Julian Pidancet