@@ -1,5 +1,6 @@
#include "libcflat.h"
#include "apic.h"
+#include "io.h"
static void *g_apic = (void *)0xfee00000;
static void *g_ioapic = (void *)0xfec00000;
@@ -11,11 +12,6 @@ struct apic_ops {
u32 (*id)(void);
};
-static void outb(unsigned char data, unsigned short port)
-{
- asm volatile ("out %0, %1" : : "a"(data), "d"(port));
-}
-
static u32 xapic_read(unsigned reg)
{
return *(volatile u32 *)(g_apic + reg);
@@ -133,7 +129,7 @@ void ioapic_write_redir(unsigned line, ioapic_redir_entry_t e)
void enable_apic(void)
{
printf("enabling apic\n");
- xapic_write(0xf0, 0x1ff); /* spurious vector register */
+ xapic_write(0xf0, 0x1f7); /* spurious vector register */
}
void mask_pic_interrupts(void)