1N/A/*
1N/A * <Insert copyright here : it must be BSD-like so everyone can use it>
1N/A *
1N/A * Author: Erich Boleyn <erich@uruk.org> http://www.uruk.org/~erich/
1N/A *
1N/A * Header file for Intel Architecture local and I/O APIC definitions.
1N/A *
1N/A * This file was created from information in the Intel Pentium Pro
1N/A * Family Developer's Manual, Volume 3: Operating System Writer's
1N/A * Manual, order number 242692-001, which can be ordered from the
1N/A * Intel literature center.
1N/A */
1N/A
1N/A#ifndef _APIC_H
1N/A#define _APIC_H
1N/A
1N/A/*
1N/A * APIC Defines.
1N/A */
1N/A
1N/A#define APIC_BROADCAST_ID 0xFF
1N/A
1N/A/*
1N/A * APIC register definitions
1N/A */
1N/A
1N/A/*
1N/A * Shared defines for I/O and local APIC definitions
1N/A */
1N/A/* APIC version register */
1N/A#define APIC_VERSION(x) ((x) & 0xFF)
1N/A/* if the APIC version is equal or greater than APIC_VER_NEW, it
1N/A is a "new" APIC */
1N/A#define APIC_VER_NEW 0x10
1N/A/* this next one is used in all cases but an old local APIC, which has
1N/A 2 entries in it's LVT */
1N/A#define APIC_MAXREDIR(x) (((x) >> 16) & 0xFF)
1N/A/* APIC id register */
1N/A#define APIC_OLD_ID(x) ((x) >> 24)
1N/A#define APIC_NEW_ID(x) (((x) >> 24) & 0xF)
1N/A
1N/A#define IOAPIC_REGSEL 0
1N/A#define IOAPIC_RW 0x10
1N/A#define IOAPIC_ID 0
1N/A#define IOAPIC_VER 1
1N/A#define IOAPIC_REDIR 0x10
1N/A#define LAPIC_ID 0x20
1N/A#define LAPIC_VER 0x30
1N/A#define LAPIC_TPR 0x80
1N/A#define LAPIC_APR 0x90
1N/A#define LAPIC_PPR 0xA0
1N/A#define LAPIC_EOI 0xB0
1N/A#define LAPIC_LDR 0xD0
1N/A#define LAPIC_DFR 0xE0
1N/A#define LAPIC_SPIV 0xF0
1N/A#define LAPIC_SPIV_ENABLE_APIC 0x100
1N/A#define LAPIC_ISR 0x100
1N/A#define LAPIC_TMR 0x180
1N/A#define LAPIC_IRR 0x200
1N/A#define LAPIC_ESR 0x280
1N/A#define LAPIC_ICR 0x300
1N/A#define LAPIC_DEST_MASK 0xFFFFFF
1N/A#define LAPIC_LVTT 0x320
1N/A#define LAPIC_LVTPC 0x340
1N/A#define LAPIC_LVT0 0x350
1N/A#define LAPIC_LVT1 0x360
1N/A#define LAPIC_LVTE 0x370
1N/A#define LAPIC_TICR 0x380
1N/A#define LAPIC_TCCR 0x390
1N/A#define LAPIC_TDCR 0x3E0
1N/A
1N/A#endif /* _APIC_H */