[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/2] pc: improve onboard I/O port debugging
From: |
Blue Swirl |
Subject: |
[Qemu-devel] [PATCH 1/2] pc: improve onboard I/O port debugging |
Date: |
Sat, 15 May 2010 12:50:06 +0300 |
Signed-off-by: Blue Swirl <address@hidden>
---
hw/pc.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index db2b9a2..938b2e0 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -51,6 +51,16 @@
/* output Bochs bios info messages */
//#define DEBUG_BIOS
+/* debug board I/O ports */
+//#define DEBUG_IOPORTS
+
+#ifdef DEBUG_IOPORTS
+#define DPRINTF_IO(fmt, ...) \
+ do { printf("IOPORT: " fmt , ## __VA_ARGS__); } while (0)
+#else
+#define DPRINTF_IO(fmt, ...)
+#endif
+
#define BIOS_FILENAME "bios.bin"
#define PC_MAX_BIOS_SIZE (4 * 1024 * 1024)
@@ -103,6 +113,7 @@ static void isa_irq_handler(void *opaque, int n, int level)
static void ioport80_write(void *opaque, uint32_t addr, uint32_t data)
{
+ DPRINTF_IO("write addr %x data %x\n", addr, data);
}
/* MSDOS compatibility mode FPU exception support */
@@ -384,13 +395,18 @@ int ioport_get_a20(void)
static void ioport92_write(void *opaque, uint32_t addr, uint32_t val)
{
+ DPRINTF_IO("write addr %x data %x\n", addr, val);
ioport_set_a20((val >> 1) & 1);
/* XXX: bit 0 is fast reset */
}
static uint32_t ioport92_read(void *opaque, uint32_t addr)
{
- return ioport_get_a20() << 1;
+ uint32_t ret;
+
+ ret = ioport_get_a20() << 1;
+ DPRINTF_IO("read addr %x data %x\n", addr, ret);
+ return ret;
}
/***********************************************************/
--
1.6.2.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH 1/2] pc: improve onboard I/O port debugging,
Blue Swirl <=