@@ -235,13 +235,28 @@ static void bamboo_init(MachineState *machine)
serial_mm_init(address_space_mem, 0xef600300, 0, pic[0],
PPC_SERIAL_MM_BAUDBASE, serial_hds[0],
DEVICE_BIG_ENDIAN);
+ } else {
+ qemu_free_irq(pic[0]);
}
if (serial_hds[1] != NULL) {
serial_mm_init(address_space_mem, 0xef600400, 0, pic[1],
PPC_SERIAL_MM_BAUDBASE, serial_hds[1],
DEVICE_BIG_ENDIAN);
+ } else {
+ qemu_free_irq(pic[1]);
}
+ for (i = 2; i < 14; i++) {
+ qemu_free_irq(pic[i]);
+ }
+ for (i = 15; i < 25; i++) {
+ qemu_free_irq(pic[i]);
+ }
+ for (i = 29; i < 32; i++) {
+ qemu_free_irq(pic[i]);
+ }
+ g_free(pic);
+
if (pcibus) {
/* Register network interfaces. */
for (i = 0; i < nb_nics; i++) {