haiku/headers/private/kernel/arch/x86/msi.h
Michael Lotz 33fbe25496 * Add code to allocate and free interrupt vectors for message signaled
interrupts (MSI).
* Add the remaining IDT entries and redirection functions in the interrupt code.
* Make the PIC end_of_interrupt() return a result to indicate whether the vector
  was handled by this PIC. If it isn't we now issue a apic_end_of_interrupt()
  in the assumption of apic local interrupt, MSI or IPI. This also removes
  the need for the gUsingIOAPIC global and doing manual apic_end_of_interrupt()
  calls in the SMP and timer code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36221 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 14:46:09 +00:00

34 lines
1.0 KiB
C

#ifndef _KERNEL_ARCH_x86_MSI_H
#define _KERNEL_ARCH_x86_MSI_H
#include <SupportDefs.h>
// address register
#define MSI_ADDRESS_BASE 0xfee00000
#define MSI_DESTINATION_ID_SHIFT 12
#define MSI_REDIRECTION 0x00000008
#define MSI_NO_REDIRECTION 0x00000000
#define MSI_DESTINATION_MODE_LOGICAL 0x00000004
#define MSI_DESTINATION_MODE_PHYSICAL 0x00000000
// data register
#define MSI_TRIGGER_MODE_EDGE 0x00000000
#define MSI_TRIGGER_MODE_LEVEL 0x00008000
#define MSI_LEVEL_DEASSERT 0x00000000
#define MSI_LEVEL_ASSERT 0x00004000
#define MSI_DELIVERY_MODE_FIXED 0x00000000
#define MSI_DELIVERY_MODE_LOWEST_PRIO 0x00000100
#define MSI_DELIVERY_MODE_SMI 0x00000200
#define MSI_DELIVERY_MODE_NMI 0x00000400
#define MSI_DELIVERY_MODE_INIT 0x00000500
#define MSI_DELIVERY_MODE_EXT_INT 0x00000700
void msi_init();
bool msi_supported();
status_t msi_allocate_vectors(uint8 count, uint8 *startVector,
uint64 *address, uint16 *data);
void msi_free_vectors(uint8 count, uint8 startVector);
#endif // _KERNEL_ARCH_x86_MSI_H