haiku/headers/private/kernel/arch/x86/ioapic.h
Michael Lotz 8908aef9c2 * Don't map the IO-APIC within the bootloader. We don't need it to set up SMP
at all and, since there can be multiple IO-APICs, we need to do the
  enumeration again in the kernel anyway. Also only set ioapic_phys the first
  time we encounter an IO-APIC object as it looks cleaner when we arrive at the
  first IO-APIC default address.
* Therefore we don't have to worry about already mapped IO-APICs when
  enumerating them in the kernel.
* Also remove the mapping function that is now not used anymore.
* We still use the ioapic_phys field of the kernel args to determine whether
  there is an IO-APIC at all to avoid needlessly doing the enumeration again.

This fixes multi IO-APIC configurations, because before we would indeed map
the last IO-APIC listed in the MADT, but then in the kernel assumed we mapped
the first one. We'd end up with mapping the last listed IO-APIC twice and the
first IO-APIC never, always programming the last one when we actually targetted
the first one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41476 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-13 16:31:31 +00:00

17 lines
344 B
C

/*
* Copyright 2011, Michael Lotz, mmlr@mlotz.ch.
* Distributed under the terms of the MIT License.
*/
#ifndef _KERNEL_ARCH_x86_IOAPIC_H
#define _KERNEL_ARCH_x86_IOAPIC_H
#include <SupportDefs.h>
struct kernel_args;
bool ioapic_is_interrupt_available(int32 gsi);
void ioapic_init(kernel_args* args);
#endif // _KERNEL_ARCH_x86_IOAPIC_H