Revision b430a225 hw/sun4u.c
b/hw/sun4u.c | ||
---|---|---|
39 | 39 |
#include "elf.h" |
40 | 40 |
|
41 | 41 |
//#define DEBUG_IRQ |
42 |
//#define DEBUG_EBUS |
|
42 | 43 |
|
43 | 44 |
#ifdef DEBUG_IRQ |
44 |
#define DPRINTF(fmt, ...) \
|
|
45 |
#define CPUIRQ_DPRINTF(fmt, ...) \
|
|
45 | 46 |
do { printf("CPUIRQ: " fmt , ## __VA_ARGS__); } while (0) |
46 | 47 |
#else |
47 |
#define DPRINTF(fmt, ...) |
|
48 |
#define CPUIRQ_DPRINTF(fmt, ...) |
|
49 |
#endif |
|
50 |
|
|
51 |
#ifdef DEBUG_EBUS |
|
52 |
#define EBUS_DPRINTF(fmt, ...) \ |
|
53 |
do { printf("EBUS: " fmt , ## __VA_ARGS__); } while (0) |
|
54 |
#else |
|
55 |
#define EBUS_DPRINTF(fmt, ...) |
|
48 | 56 |
#endif |
49 | 57 |
|
50 | 58 |
#define KERNEL_LOAD_ADDR 0x00404000 |
... | ... | |
238 | 246 |
|
239 | 247 |
env->interrupt_index = TT_EXTINT | i; |
240 | 248 |
if (old_interrupt != env->interrupt_index) { |
241 |
DPRINTF("Set CPU IRQ %d\n", i); |
|
249 |
CPUIRQ_DPRINTF("Set CPU IRQ %d\n", i);
|
|
242 | 250 |
cpu_interrupt(env, CPU_INTERRUPT_HARD); |
243 | 251 |
} |
244 | 252 |
break; |
245 | 253 |
} |
246 | 254 |
} |
247 | 255 |
} else if (!pil && (env->interrupt_index & ~15) == TT_EXTINT) { |
248 |
DPRINTF("Reset CPU IRQ %d\n", env->interrupt_index & 15); |
|
256 |
CPUIRQ_DPRINTF("Reset CPU IRQ %d\n", env->interrupt_index & 15);
|
|
249 | 257 |
env->interrupt_index = 0; |
250 | 258 |
cpu_reset_interrupt(env, CPU_INTERRUPT_HARD); |
251 | 259 |
} |
... | ... | |
256 | 264 |
CPUState *env = opaque; |
257 | 265 |
|
258 | 266 |
if (level) { |
259 |
DPRINTF("Raise CPU IRQ %d\n", irq); |
|
267 |
CPUIRQ_DPRINTF("Raise CPU IRQ %d\n", irq);
|
|
260 | 268 |
env->halted = 0; |
261 | 269 |
env->pil_in |= 1 << irq; |
262 | 270 |
cpu_check_irqs(env); |
263 | 271 |
} else { |
264 |
DPRINTF("Lower CPU IRQ %d\n", irq); |
|
272 |
CPUIRQ_DPRINTF("Lower CPU IRQ %d\n", irq);
|
|
265 | 273 |
env->pil_in &= ~(1 << irq); |
266 | 274 |
cpu_check_irqs(env); |
267 | 275 |
} |
... | ... | |
347 | 355 |
static void ebus_mmio_mapfunc(PCIDevice *pci_dev, int region_num, |
348 | 356 |
pcibus_t addr, pcibus_t size, int type) |
349 | 357 |
{ |
350 |
DPRINTF("Mapping region %d registers at %" FMT_PCIBUS "\n", region_num,
|
|
351 |
addr); |
|
358 |
EBUS_DPRINTF("Mapping region %d registers at %" FMT_PCIBUS "\n",
|
|
359 |
region_num, addr);
|
|
352 | 360 |
switch (region_num) { |
353 | 361 |
case 0: |
354 | 362 |
isa_mmio_init(addr, 0x1000000); |
Also available in: Unified diff