Home | History | Annotate | Download | only in stage2
      1 /*
      2  *  <Insert copyright here : it must be BSD-like so everyone can use it>
      3  *
      4  *  Author:  Erich Boleyn  <erich (at) uruk.org>   http://www.uruk.org/~erich/
      5  *
      6  *  Header file for Intel Architecture local and I/O APIC definitions.
      7  *
      8  *  This file was created from information in the Intel Pentium Pro
      9  *  Family Developer's Manual, Volume 3: Operating System Writer's
     10  *  Manual, order number 242692-001, which can be ordered from the
     11  *  Intel literature center.
     12  */
     13 
     14 #ifndef _APIC_H
     15 #define _APIC_H
     16 
     17 /*
     18  *  APIC Defines.
     19  */
     20 
     21 #define APIC_BROADCAST_ID		       	0xFF
     22 
     23 /*
     24  *  APIC register definitions
     25  */
     26 
     27 /*
     28  *  Shared defines for I/O and local APIC definitions
     29  */
     30 /* APIC version register */
     31 #define	APIC_VERSION(x)				((x) & 0xFF)
     32 /* if the APIC version is equal or greater than APIC_VER_NEW, it
     33    is a "new" APIC */
     34 #define APIC_VER_NEW				0x10
     35 /* this next one is used in all cases but an old local APIC, which has
     36    2 entries in it's LVT */
     37 #define	APIC_MAXREDIR(x)			(((x) >> 16) & 0xFF)
     38 /* APIC id register */
     39 #define	APIC_OLD_ID(x)				((x) >> 24)
     40 #define	APIC_NEW_ID(x)				(((x) >> 24) & 0xF)
     41 
     42 #define IOAPIC_REGSEL				0
     43 #define IOAPIC_RW				0x10
     44 #define		IOAPIC_ID			0
     45 #define		IOAPIC_VER			1
     46 #define		IOAPIC_REDIR			0x10
     47 #define LAPIC_ID				0x20
     48 #define LAPIC_VER				0x30
     49 #define LAPIC_TPR				0x80
     50 #define LAPIC_APR				0x90
     51 #define LAPIC_PPR				0xA0
     52 #define LAPIC_EOI				0xB0
     53 #define LAPIC_LDR				0xD0
     54 #define LAPIC_DFR				0xE0
     55 #define LAPIC_SPIV				0xF0
     56 #define		LAPIC_SPIV_ENABLE_APIC		0x100
     57 #define LAPIC_ISR				0x100
     58 #define LAPIC_TMR				0x180
     59 #define LAPIC_IRR				0x200
     60 #define LAPIC_ESR				0x280
     61 #define LAPIC_ICR				0x300
     62 #define		LAPIC_DEST_MASK			0xFFFFFF
     63 #define LAPIC_LVTT				0x320
     64 #define LAPIC_LVTPC		       		0x340
     65 #define LAPIC_LVT0				0x350
     66 #define LAPIC_LVT1				0x360
     67 #define LAPIC_LVTE				0x370
     68 #define LAPIC_TICR				0x380
     69 #define LAPIC_TCCR				0x390
     70 #define LAPIC_TDCR				0x3E0
     71 
     72 #endif /* _APIC_H */
     73