@@ -48,17 +48,19 @@
#define IORESOURCE_PREFETCH 0x00002000 /* No side effects */
#define IORESOURCE_MEM_64 0x00100000
-//#define DEVICE_ASSIGNMENT_DEBUG
+//#define DEVICE_ASSIGNMENT_DEBUG 1
-#ifdef DEVICE_ASSIGNMENT_DEBUG
-#define DEBUG(fmt, ...) \
- do { \
- fprintf(stderr, "%s: " fmt, __func__ , __VA_ARGS__); \
- } while (0)
-#else
-#define DEBUG(fmt, ...)
+#ifndef DEVICE_ASSIGNMENT_DEBUG
+#define DEVICE_ASSIGNMENT_DEBUG 0
#endif
+#define DEBUG(fmt, ...) \
+ do { \
+ if(DEVICE_ASSIGNMENT_DEBUG) { \
+ fprintf(stderr, "%s: " fmt, __func__ , __VA_ARGS__); \
+ } \
+ } while (0)
+
typedef struct PCIRegion {
int type; /* Memory or port I/O */
int valid;
@@ -30,14 +30,19 @@
#include "sysemu/sysemu.h"
/* Show multiboot debug output */
-//#define DEBUG_MULTIBOOT
+//#define DEBUG_MULTIBOOT 1
-#ifdef DEBUG_MULTIBOOT
-#define mb_debug(a...) fprintf(stderr, ## a)
-#else
-#define mb_debug(a...)
+#ifndef DEBUG_MULTIBOOT
+#define DEBUG_MULTIBOOT 0
#endif
+#define mb_debug(a...) \
+ do { \
+ if(DEBUG_MULTIBOOT) { \
+ fprintf(stderr, ## a); \
+ } \
+ } while(0)
+
#define MULTIBOOT_STRUCT_ADDR 0x9000
#if MULTIBOOT_STRUCT_ADDR > 0xf0000