hw_x86_64: Change IRTE_COUNT to designate number of IRTEs
Adjust IRTE_COUNT to specify the number of IRTEs and not the index of the last IRTE entry. This fixes an off-by-one error in the toggle_mask() function, where the range check for I/O APIC IRQs wrongly ignored IRQ 23.
This commit is contained in:
parent
61572263d7
commit
69e9929f71
|
@ -57,7 +57,7 @@ class Genode::Ioapic : public Mmio
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
/* Number of Redirection Table entries */
|
/* Number of Redirection Table entries */
|
||||||
IRTE_COUNT = 0x17,
|
IRTE_COUNT = 24,
|
||||||
|
|
||||||
/* Register selectors */
|
/* Register selectors */
|
||||||
IOAPICVER = 0x01,
|
IOAPICVER = 0x01,
|
||||||
|
@ -140,7 +140,7 @@ class Genode::Ioapic : public Mmio
|
||||||
}
|
}
|
||||||
|
|
||||||
/* remap all IRQs managed by I/O APIC */
|
/* remap all IRQs managed by I/O APIC */
|
||||||
if (i <= IRTE_COUNT) {
|
if (i < IRTE_COUNT) {
|
||||||
Irte::access_t irte = _create_irt_entry(i);
|
Irte::access_t irte = _create_irt_entry(i);
|
||||||
write<Ioregsel>(IOREDTBL + 2 * i + 1);
|
write<Ioregsel>(IOREDTBL + 2 * i + 1);
|
||||||
write<Iowin>(irte >> Iowin::ACCESS_WIDTH);
|
write<Iowin>(irte >> Iowin::ACCESS_WIDTH);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user