Commit c4781a51a5f5e5ea2660d5373602c991fede7b5d
1 parent
4c823cff
Implement PreP reset port.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3481 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
5 additions
and
1 deletions
hw/ppc_prep.c
| @@ -252,6 +252,7 @@ static CPUReadMemoryFunc *PPC_XCSR_read[] = { | @@ -252,6 +252,7 @@ static CPUReadMemoryFunc *PPC_XCSR_read[] = { | ||
| 252 | 252 | ||
| 253 | /* Fake super-io ports for PREP platform (Intel 82378ZB) */ | 253 | /* Fake super-io ports for PREP platform (Intel 82378ZB) */ |
| 254 | typedef struct sysctrl_t { | 254 | typedef struct sysctrl_t { |
| 255 | + qemu_irq reset_irq; | ||
| 255 | m48t59_t *nvram; | 256 | m48t59_t *nvram; |
| 256 | uint8_t state; | 257 | uint8_t state; |
| 257 | uint8_t syscontrol; | 258 | uint8_t syscontrol; |
| @@ -293,7 +294,9 @@ static void PREP_io_800_writeb (void *opaque, uint32_t addr, uint32_t val) | @@ -293,7 +294,9 @@ static void PREP_io_800_writeb (void *opaque, uint32_t addr, uint32_t val) | ||
| 293 | /* Special port 92 */ | 294 | /* Special port 92 */ |
| 294 | /* Check soft reset asked */ | 295 | /* Check soft reset asked */ |
| 295 | if (val & 0x01) { | 296 | if (val & 0x01) { |
| 296 | - // cpu_interrupt(first_cpu, PPC_INTERRUPT_RESET); | 297 | + qemu_irq_raise(sysctrl->reset_irq); |
| 298 | + } else { | ||
| 299 | + qemu_irq_lower(sysctrl->reset_irq); | ||
| 297 | } | 300 | } |
| 298 | /* Check LE mode */ | 301 | /* Check LE mode */ |
| 299 | if (val & 0x02) { | 302 | if (val & 0x02) { |
| @@ -660,6 +663,7 @@ static void ppc_prep_init (int ram_size, int vga_ram_size, int boot_device, | @@ -660,6 +663,7 @@ static void ppc_prep_init (int ram_size, int vga_ram_size, int boot_device, | ||
| 660 | register_ioport_read(0x61, 1, 1, speaker_ioport_read, NULL); | 663 | register_ioport_read(0x61, 1, 1, speaker_ioport_read, NULL); |
| 661 | register_ioport_write(0x61, 1, 1, speaker_ioport_write, NULL); | 664 | register_ioport_write(0x61, 1, 1, speaker_ioport_write, NULL); |
| 662 | /* Register fake IO ports for PREP */ | 665 | /* Register fake IO ports for PREP */ |
| 666 | + sysctrl->reset_irq = first_cpu->irq_inputs[PPC6xx_INPUT_HRESET]; | ||
| 663 | register_ioport_read(0x398, 2, 1, &PREP_io_read, sysctrl); | 667 | register_ioport_read(0x398, 2, 1, &PREP_io_read, sysctrl); |
| 664 | register_ioport_write(0x398, 2, 1, &PREP_io_write, sysctrl); | 668 | register_ioport_write(0x398, 2, 1, &PREP_io_write, sysctrl); |
| 665 | /* System control ports */ | 669 | /* System control ports */ |