| 945 |
{ |
{ |
| 946 |
IOAPICState *s = opaque; |
IOAPICState *s = opaque; |
| 947 |
|
|
| 948 |
|
/* ISA IRQs map to GSI 1-1 except for IRQ0 which maps |
| 949 |
|
* to GSI 2. GSI maps to ioapic 1-1. This is not |
| 950 |
|
* the cleanest way of doing it but it should work. */ |
| 951 |
|
|
| 952 |
|
if (vector == 0) |
| 953 |
|
vector = 2; |
| 954 |
|
|
| 955 |
if (vector >= 0 && vector < IOAPIC_NUM_PINS) { |
if (vector >= 0 && vector < IOAPIC_NUM_PINS) { |
| 956 |
uint32_t mask = 1 << vector; |
uint32_t mask = 1 << vector; |
| 957 |
uint64_t entry = s->ioredtbl[vector]; |
uint64_t entry = s->ioredtbl[vector]; |