Home | History | Annotate | Line # | Download | only in include
mpconfig.h revision 1.3
      1  1.3  fvdl /*	$NetBSD: mpconfig.h,v 1.3 2003/05/29 20:22:32 fvdl Exp $	*/
      2  1.1  fvdl 
      3  1.1  fvdl /*
      4  1.1  fvdl  * Definitions originally from the mpbios code, but now used for ACPI
      5  1.1  fvdl  * MP config as well.
      6  1.1  fvdl  */
      7  1.1  fvdl 
      8  1.1  fvdl #ifndef _X86_MPCONFIG_H
      9  1.1  fvdl #define _X86_MPCONFIG_H
     10  1.1  fvdl 
     11  1.1  fvdl /*
     12  1.1  fvdl  * Interrupt typess
     13  1.1  fvdl  */
     14  1.1  fvdl #define MPS_INTTYPE_INT         0
     15  1.1  fvdl #define MPS_INTTYPE_NMI         1
     16  1.1  fvdl #define MPS_INTTYPE_SMI         2
     17  1.1  fvdl #define MPS_INTTYPE_ExtINT      3
     18  1.1  fvdl 
     19  1.1  fvdl #define MPS_INTPO_DEF           0
     20  1.1  fvdl #define MPS_INTPO_ACTHI         1
     21  1.1  fvdl #define MPS_INTPO_ACTLO         3
     22  1.1  fvdl 
     23  1.1  fvdl #define MPS_INTTR_DEF           0
     24  1.1  fvdl #define MPS_INTTR_EDGE          1
     25  1.1  fvdl #define MPS_INTTR_LEVEL         3
     26  1.1  fvdl 
     27  1.1  fvdl #ifndef _LOCORE
     28  1.1  fvdl 
     29  1.1  fvdl struct mpbios_int;
     30  1.1  fvdl 
     31  1.1  fvdl struct mp_bus
     32  1.1  fvdl {
     33  1.1  fvdl 	char *mb_name;		/* XXX bus name */
     34  1.1  fvdl 	int mb_idx;		/* XXX bus index */
     35  1.1  fvdl 	void (*mb_intr_print) __P((int));
     36  1.1  fvdl 	void (*mb_intr_cfg) __P((const struct mpbios_int *, u_int32_t *));
     37  1.1  fvdl 	struct mp_intr_map *mb_intrs;
     38  1.1  fvdl 	u_int32_t mb_data;	/* random bus-specific datum. */
     39  1.3  fvdl 	int mb_configured;	/* has been autoconfigured */
     40  1.1  fvdl };
     41  1.1  fvdl 
     42  1.1  fvdl struct mp_intr_map
     43  1.1  fvdl {
     44  1.1  fvdl 	struct mp_intr_map *next;
     45  1.1  fvdl 	struct mp_bus *bus;
     46  1.1  fvdl 	int bus_pin;
     47  1.1  fvdl 	struct ioapic_softc *ioapic;
     48  1.1  fvdl 	int ioapic_pin;
     49  1.1  fvdl 	int ioapic_ih;		/* int handle, for apic_intr_est */
     50  1.1  fvdl 	int type;		/* from mp spec intr record */
     51  1.1  fvdl  	int flags;		/* from mp spec intr record */
     52  1.1  fvdl 	u_int32_t redir;
     53  1.1  fvdl 	int cpu_id;
     54  1.2  fvdl 	int global_int;		/* ACPI global interrupt number */
     55  1.1  fvdl };
     56  1.1  fvdl 
     57  1.1  fvdl #if defined(_KERNEL)
     58  1.1  fvdl extern int mp_verbose;
     59  1.1  fvdl extern struct mp_bus *mp_busses;
     60  1.1  fvdl extern struct mp_intr_map *mp_intrs;
     61  1.1  fvdl extern int mp_nintr;
     62  1.1  fvdl extern int mp_isa_bus, mp_eisa_bus;
     63  1.1  fvdl extern int mp_nbus;
     64  1.1  fvdl #endif
     65  1.1  fvdl #endif
     66  1.1  fvdl 
     67  1.1  fvdl #endif /* _X86_MPCONFIG_H */
     68