[SeaBIOS] [PATCH] Automatically select 0xe9 as default debug port if configured for Xen

Julian Pidancet julian.pidancet at gmail.com
Tue Feb 7 17:11:00 CET 2012

On Sun, Feb 5, 2012 at 1:56 AM, Kevin O'Connor <kevin at koconnor.net> wrote:
> On Sun, Feb 05, 2012 at 12:46:58AM +0000, Julian Pidancet wrote:
>> As per Ian comment on previous commit 7123d9834d58287d43514d7799ed1a7b34eea243
>> Signed-off-by: Julian Pidancet <julian.pidancet at gmail.com>
>> ---
>>  src/Kconfig |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>> diff --git a/src/Kconfig b/src/Kconfig
>> index cf0bff0..cee0005 100644
>> --- a/src/Kconfig
>> +++ b/src/Kconfig
>> @@ -361,6 +361,7 @@ menu "Debugging"
>>      config DEBUG_IO_PORT
>>          depends on DEBUG_IO
>>          hex "Debug IO port address"
>> +        default 0x00e9 if XEN
>>          default 0x0402
>>          help
>>              Bochs uses the 0x0402 address by default, whereas Xen
> Setting of default values doesn't work well when done this way.  To
> test, run "make menuconfig" select a build without xen, and run make.
> You'll see out/autoconf.h has DEBUG_IO_PORT=0x402.  Then run "make
> menuconfig" select xen, and run make.  You'll still see
> DEBUG_IO_PORT=0x402.
> You can look at VGA_VID in vgasrc/Kconfig for one possible solution to
> the above.
> -Kevin

I tried to use the same technique as you used in vgasrc/Kconfig:

    config DEBUG_IO
        depends on !COREBOOT && DEBUG_LEVEL != 0
        bool "Special IO port debugging"
        default y
            Some emulators or hypervisors provide with a way to output debug
            information by outputing strings in a special port present in the
            IO space.

        depends on DEBUG_IO
        prompt "Debug IO port address"
        default DEBUG_IO_PORT_XEN if XEN
        default DEBUG_IO_PORT_BOCHS

        config DEBUG_IO_PORT_BOCHS
            bool "0x402 (Bochs)"
        config DEBUG_IO_PORT_XEN
            bool "0xe9 (Xen)"
        config DEBUG_IO_PORT_CUSTOM
            bool "Custom"

    config DEBUG_IO_PORT
        prompt "Debug IO port address" if DEBUG_IO_PORT_CUSTOM
        default 0x0402 if DEBUG_IO_PORT_BOCHS
        default 0x00e9 if DEBUG_IO_PORT_XEN
        default 0x0000
            Bochs uses the 0x0402 address by default, whereas Xen
            makes the 0xe9 IO address available for guests use.

Unfortunately, it still seem subject to the same issue. Is there
anything I am missing here ?


More information about the SeaBIOS mailing list