Home | History | Annotate | Line # | Download | only in include
mpconfig.h revision 1.6
      1 /*	$NetBSD: mpconfig.h,v 1.6 2003/10/27 13:43:48 junyoung 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  * XXX
     13  */
     14 #include <machine/bus.h>
     15 #include <dev/pci/pcivar.h>
     16 #include <machine/pci_machdep.h>
     17 
     18 /*
     19  * Interrupt typess
     20  */
     21 #define MPS_INTTYPE_INT         0
     22 #define MPS_INTTYPE_NMI         1
     23 #define MPS_INTTYPE_SMI         2
     24 #define MPS_INTTYPE_ExtINT      3
     25 
     26 #define MPS_INTPO_DEF           0
     27 #define MPS_INTPO_ACTHI         1
     28 #define MPS_INTPO_ACTLO         3
     29 
     30 #define MPS_INTTR_DEF           0
     31 #define MPS_INTTR_EDGE          1
     32 #define MPS_INTTR_LEVEL         3
     33 
     34 #ifndef _LOCORE
     35 
     36 struct mpbios_int;
     37 
     38 struct mp_bus
     39 {
     40 	char *mb_name;		/* XXX bus name */
     41 	int mb_idx;		/* XXX bus index */
     42 	void (*mb_intr_print)(int);
     43 	void (*mb_intr_cfg)(const struct mpbios_int *, u_int32_t *);
     44 	struct mp_intr_map *mb_intrs;
     45 	u_int32_t mb_data;	/* random bus-specific datum. */
     46 	int mb_configured;	/* has been autoconfigured */
     47 	pcitag_t *mb_pci_bridge_tag;
     48 	pci_chipset_tag_t mb_pci_chipset_tag;
     49 };
     50 
     51 struct mp_intr_map
     52 {
     53 	struct mp_intr_map *next;
     54 	struct mp_bus *bus;
     55 	int bus_pin;
     56 	struct ioapic_softc *ioapic;
     57 	int ioapic_pin;
     58 	int ioapic_ih;		/* int handle, for apic_intr_est */
     59 	int type;		/* from mp spec intr record */
     60  	int flags;		/* from mp spec intr record */
     61 	u_int32_t redir;
     62 	int cpu_id;
     63 	int global_int;		/* ACPI global interrupt number */
     64 	int sflags;		/* other, software flags (see below) */
     65 };
     66 
     67 #define MPI_OVR		0x0001	/* Was overridden by an ACPI OVR */
     68 
     69 #if defined(_KERNEL)
     70 extern int mp_verbose;
     71 extern struct mp_bus *mp_busses;
     72 extern struct mp_intr_map *mp_intrs;
     73 extern int mp_nintr;
     74 extern int mp_isa_bus, mp_eisa_bus;
     75 extern int mp_nbus;
     76 #endif
     77 #endif
     78 
     79 #endif /* _X86_MPCONFIG_H */
     80