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