PPC: Make interrupts work

The interrupt code as is didn't really work for me. I couldn't even convince
Linux to take interrupt 9 in an interrupt-map.

So let's do this right. Let's map all PCI interrupts to 0x1b - 0x1e. That way
we're at least a small step closer to what real hardware does.

I also took the interrupt pin to line conversion from OpenBIOS, which at least
assures us we're compatible with our firmware :-).

A dump of the PCI interrupt-map from a U2 (iBook):

00009000 00000000 00000000 00000000 ff97c528 00000034 00000001
0000d800 00000000 00000000 00000000 ff97c528 0000003f 00000001
0000c000 00000000 00000000 00000000 ff97c528 0000001b 00000001
0000c800 00000000 00000000 00000000 ff97c528 0000001c 00000001
0000d000 00000000 00000000 00000000 ff97c528 0000001d 00000001

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
1 file changed
tree: 4d6faf4d5408e4be5a2897bcde863a85747357cb
  1. audio/
  2. block/
  3. bsd-user/
  4. darwin-user/
  5. default-configs/
  6. docs/
  7. fpu/
  8. gdb-xml/
  9. hw/
  10. linux-user/
  11. net/
  12. pc-bios/
  13. QMP/
  14. roms/
  15. slirp/
  16. target-alpha/
  17. target-arm/
  18. target-cris/
  19. target-i386/
  20. target-m68k/
  21. target-microblaze/
  22. target-mips/
  23. target-ppc/
  24. target-s390x/
  25. target-sh4/
  26. target-sparc/
  27. tcg/
  28. tests/
  29. .gitignore
  30. .gitmodules
  31. a.out.h
  32. acl.c
  33. acl.h
  34. aes.c
  35. aes.h
  36. aio.c
  37. alpha-dis.c
  38. alpha.ld
  39. arm-dis.c
  40. arm-semi.c
  41. arm.ld
  42. async.c
  43. balloon.h
  44. block-migration.c
  45. block-migration.h
  46. block.c
  47. block.h
  48. block_int.h
  49. bswap.h
  50. bt-host.c
  51. bt-host.h
  52. bt-vhci.c
  53. buffered_file.c
  54. buffered_file.h
  55. cache-utils.c
  56. cache-utils.h
  57. Changelog
  58. check-qdict.c
  59. check-qfloat.c
  60. check-qint.c
  61. check-qjson.c
  62. check-qlist.c
  63. check-qstring.c
  64. cmd.c
  65. cmd.h
  66. cocoa.m
  67. CODING_STYLE
  68. config.h
  69. configure
  70. console.c
  71. console.h
  72. COPYING
  73. COPYING.LIB
  74. cpu-all.h
  75. cpu-common.h
  76. cpu-defs.h
  77. cpu-exec.c
  78. create_config
  79. cris-dis.c
  80. curses.c
  81. curses_keys.h
  82. cutils.c
  83. d3des.c
  84. d3des.h
  85. def-helper.h
  86. device_tree.c
  87. device_tree.h
  88. dis-asm.h
  89. disas.c
  90. disas.h
  91. dma-helpers.c
  92. dma.h
  93. dyngen-exec.h
  94. elf.h
  95. envlist.c
  96. envlist.h
  97. exec-all.h
  98. exec.c
  99. feature_to_c.sh
  100. gdbstub.c
  101. gdbstub.h
  102. gen-icount.h
  103. host-utils.c
  104. host-utils.h
  105. hostregs_helper.h
  106. hpet.h
  107. hppa-dis.c
  108. hppa.ld
  109. hxtool
  110. i386-dis.c
  111. i386.ld
  112. ia64.ld
  113. input.c
  114. ioport-user.c
  115. ioport.c
  116. ioport.h
  117. json-lexer.c
  118. json-lexer.h
  119. json-parser.c
  120. json-parser.h
  121. json-streamer.c
  122. json-streamer.h
  123. keymaps.c
  124. keymaps.h
  125. kvm-all.c
  126. kvm.h
  127. libfdt_env.h
  128. LICENSE
  129. linux-aio.c
  130. m68k-dis.c
  131. m68k-semi.c
  132. m68k.ld
  133. MAINTAINERS
  134. Makefile
  135. Makefile.hw
  136. Makefile.objs
  137. Makefile.target
  138. Makefile.user
  139. microblaze-dis.c
  140. migration-exec.c
  141. migration-fd.c
  142. migration-tcp.c
  143. migration-unix.c
  144. migration.c
  145. migration.h
  146. mips-dis.c
  147. mips.ld
  148. module.c
  149. module.h
  150. monitor.c
  151. monitor.h
  152. nbd.c
  153. nbd.h
  154. net-checksum.c
  155. net.c
  156. net.h
  157. osdep.c
  158. osdep.h
  159. path.c
  160. pci-ids.txt
  161. posix-aio-compat.c
  162. ppc-dis.c
  163. ppc.ld
  164. ppc64.ld
  165. qbool.c
  166. qbool.h
  167. qdict-test-data.txt
  168. qdict.c
  169. qdict.h
  170. qemu-aio.h
  171. qemu-binfmt-conf.sh
  172. qemu-char.c
  173. qemu-char.h
  174. qemu-common.h
  175. qemu-config.c
  176. qemu-config.h
  177. qemu-doc.texi
  178. qemu-img-cmds.hx
  179. qemu-img.c
  180. qemu-img.texi
  181. qemu-io.c
  182. qemu-lock.h
  183. qemu-log.h
  184. qemu-malloc.c
  185. qemu-monitor.hx
  186. qemu-nbd.c
  187. qemu-nbd.texi
  188. qemu-objects.h
  189. qemu-option.c
  190. qemu-option.h
  191. qemu-options.hx
  192. qemu-queue.h
  193. qemu-sockets.c
  194. qemu-tech.texi
  195. qemu-thread.c
  196. qemu-thread.h
  197. qemu-timer.h
  198. qemu-tool.c
  199. qemu.sasl
  200. qemu_socket.h
  201. qerror.c
  202. qerror.h
  203. qfloat.c
  204. qfloat.h
  205. qint.c
  206. qint.h
  207. qjson.c
  208. qjson.h
  209. qlist.c
  210. qlist.h
  211. qobject.h
  212. qstring.c
  213. qstring.h
  214. readline.c
  215. readline.h
  216. README
  217. rules.mak
  218. rwhandler.c
  219. rwhandler.h
  220. s390-dis.c
  221. s390.ld
  222. savevm.c
  223. sdl.c
  224. sdl_keysym.h
  225. sdl_zoom.c
  226. sdl_zoom.h
  227. sdl_zoom_template.h
  228. sh4-dis.c
  229. softmmu-semi.h
  230. softmmu_defs.h
  231. softmmu_exec.h
  232. softmmu_header.h
  233. softmmu_template.h
  234. sparc-dis.c
  235. sparc.ld
  236. sparc64.ld
  237. sysemu.h
  238. targphys.h
  239. tcg-runtime.c
  240. texi2pod.pl
  241. thunk.c
  242. thunk.h
  243. TODO
  244. translate-all.c
  245. uboot_image.h
  246. usb-bsd.c
  247. usb-linux.c
  248. usb-stub.c
  249. VERSION
  250. vgafont.h
  251. vl.c
  252. vnc-auth-sasl.c
  253. vnc-auth-sasl.h
  254. vnc-auth-vencrypt.c
  255. vnc-auth-vencrypt.h
  256. vnc-tls.c
  257. vnc-tls.h
  258. vnc.c
  259. vnc.h
  260. vnc_keysym.h
  261. vnchextile.h
  262. x86_64.ld
  263. x_keymap.c
  264. x_keymap.h