Make a Kconfig option for debugging output from realmode emulation. Trivial.
authorMyles Watson <mylesgw@gmail.com>
Tue, 7 Sep 2010 22:30:15 +0000 (22:30 +0000)
committerMyles Watson <mylesgw@gmail.com>
Tue, 7 Sep 2010 22:30:15 +0000 (22:30 +0000)
Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Myles Watson <mylesgw@gmail.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5783 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

src/Kconfig
src/devices/oprom/x86.c
src/devices/oprom/x86_interrupts.c

index ec3a13bdbf97edb9192fc9dc3ceeaef45dcc0341..be55b4bf9063b43ad3a68a0075de6a245b9051b5 100644 (file)
@@ -543,6 +543,17 @@ config DEBUG_SMM_RELOCATION
 
          If unsure, say N.
 
+config REALMODE_DEBUG
+       bool "Enable debug messages for option ROM execution"
+       default n
+       depends on PCI_OPTION_ROM_RUN_REALMODE
+       help
+         This option enables additional x86emu related debug messages.
+
+         Note: This option will increase the time to emulate a ROM.
+
+         If unsure, say N.
+
 config X86EMU_DEBUG
        bool "Output verbose x86emu debug messages"
        default n
index 42267faa5f5b72149e35ccfdb7bcfedb622b53f5..60776f68ea42b7e594d837992fc8f62a944df815 100644 (file)
@@ -329,6 +329,7 @@ int __attribute__((regparm(0))) interrupt_handler(u32 intnumber,
        cs = cs_ip >> 16;
        flags = stackflags;
 
+#if CONFIG_REALMODE_DEBUG
        printk(BIOS_DEBUG, "oprom: INT# 0x%x\n", intnumber);
        printk(BIOS_DEBUG, "oprom: eax: %08x ebx: %08x ecx: %08x edx: %08x\n",
                      eax, ebx, ecx, edx);
@@ -336,6 +337,7 @@ int __attribute__((regparm(0))) interrupt_handler(u32 intnumber,
                     ebp, esp, edi, esi);
        printk(BIOS_DEBUG, "oprom:  ip: %04x      cs: %04x   flags: %08x\n",
                     ip, cs, flags);
+#endif
 
        // Fetch arguments from the stack and put them into
        // a structure that we want to pass on to our sub interrupt
index 49d69ee3a7541bf221fead19b1fe53798c969edd..44c98d130c7d330381f2382522895544bed1570f 100644 (file)
@@ -156,8 +156,10 @@ int int1a_handler(struct eregs *regs)
                        break;
                }
 
+#if CONFIG_REALMODE_DEBUG
                printk(BIOS_DEBUG, "0x%x: bus %d devfn 0x%x reg 0x%x val 0x%x\n",
                             func, bus, devfn, reg, regs->ecx);
+#endif
                regs->eax = 0;
                retval = 0;
                break;