Revision 376253ec hw/i8259.c
b/hw/i8259.c | ||
---|---|---|
24 | 24 |
#include "hw.h" |
25 | 25 |
#include "pc.h" |
26 | 26 |
#include "isa.h" |
27 |
#include "console.h"
|
|
27 |
#include "monitor.h"
|
|
28 | 28 |
|
29 | 29 |
/* debug PIC */ |
30 | 30 |
//#define DEBUG_PIC |
... | ... | |
511 | 511 |
qemu_register_reset(pic_reset, s); |
512 | 512 |
} |
513 | 513 |
|
514 |
void pic_info(void)
|
|
514 |
void pic_info(Monitor *mon)
|
|
515 | 515 |
{ |
516 | 516 |
int i; |
517 | 517 |
PicState *s; |
... | ... | |
521 | 521 |
|
522 | 522 |
for(i=0;i<2;i++) { |
523 | 523 |
s = &isa_pic->pics[i]; |
524 |
term_printf("pic%d: irr=%02x imr=%02x isr=%02x hprio=%d irq_base=%02x rr_sel=%d elcr=%02x fnm=%d\n", |
|
525 |
i, s->irr, s->imr, s->isr, s->priority_add, |
|
526 |
s->irq_base, s->read_reg_select, s->elcr, |
|
527 |
s->special_fully_nested_mode); |
|
524 |
monitor_printf(mon, "pic%d: irr=%02x imr=%02x isr=%02x hprio=%d " |
|
525 |
"irq_base=%02x rr_sel=%d elcr=%02x fnm=%d\n", |
|
526 |
i, s->irr, s->imr, s->isr, s->priority_add, |
|
527 |
s->irq_base, s->read_reg_select, s->elcr, |
|
528 |
s->special_fully_nested_mode); |
|
528 | 529 |
} |
529 | 530 |
} |
530 | 531 |
|
531 |
void irq_info(void)
|
|
532 |
void irq_info(Monitor *mon)
|
|
532 | 533 |
{ |
533 | 534 |
#ifndef DEBUG_IRQ_COUNT |
534 |
term_printf("irq statistic code not compiled.\n");
|
|
535 |
monitor_printf(mon, "irq statistic code not compiled.\n");
|
|
535 | 536 |
#else |
536 | 537 |
int i; |
537 | 538 |
int64_t count; |
538 | 539 |
|
539 |
term_printf("IRQ statistics:\n");
|
|
540 |
monitor_printf(mon, "IRQ statistics:\n");
|
|
540 | 541 |
for (i = 0; i < 16; i++) { |
541 | 542 |
count = irq_count[i]; |
542 | 543 |
if (count > 0) |
543 |
term_printf("%2d: %" PRId64 "\n", i, count);
|
|
544 |
monitor_printf(mon, "%2d: %" PRId64 "\n", i, count);
|
|
544 | 545 |
} |
545 | 546 |
#endif |
546 | 547 |
} |
Also available in: Unified diff