#include <devices/apic.h>
-/*
- #ifndef DEBUG_IO_APIC
- #undef PrintDebug
- #define PrintDebug(fmt, args...)
- #endif
-*/
+
+#ifndef DEBUG_IO_APIC
+#undef PrintDebug
+#define PrintDebug(fmt, args...)
+#endif
+
#define IO_APIC_BASE_ADDR 0xfec00000
break;
default:
{
- uint_t redir_index = (ioapic->index_reg - IOAPIC_REDIR_BASE_REG) & 0xfffffffe;
+ uint_t redir_index = (ioapic->index_reg - IOAPIC_REDIR_BASE_REG) >> 1;
uint_t hi_val = (ioapic->index_reg - IOAPIC_REDIR_BASE_REG) % 1;
if (redir_index > 0x3f) {
break;
default:
{
- uint_t redir_index = (ioapic->index_reg - IOAPIC_REDIR_BASE_REG) & 0xfffffffe;
+ uint_t redir_index = (ioapic->index_reg - IOAPIC_REDIR_BASE_REG) >> 1;
uint_t hi_val = (ioapic->index_reg - IOAPIC_REDIR_BASE_REG) % 1;
struct redir_tbl_entry * irq_entry = NULL;
if (irq > 24) {
- PrintError("IRQ out of range of IO APIC\n");
+ PrintDebug("IRQ out of range of IO APIC\n");
return -1;
}