Home | History | Annotate | Download | only in asm
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ****************************************************************************
     11  ****************************************************************************/
     12 #ifndef __ASM_MPSPEC_DEF_H
     13 #define __ASM_MPSPEC_DEF_H
     14 
     15 #define SMP_MAGIC_IDENT (('_'<<24)|('P'<<16)|('M'<<8)|'_')
     16 
     17 #define MAX_MPC_ENTRY 1024
     18 #define MAX_APICS 256
     19 
     20 struct intel_mp_floating
     21 {
     22  char mpf_signature[4];
     23  unsigned long mpf_physptr;
     24  unsigned char mpf_length;
     25  unsigned char mpf_specification;
     26  unsigned char mpf_checksum;
     27  unsigned char mpf_feature1;
     28  unsigned char mpf_feature2;
     29  unsigned char mpf_feature3;
     30  unsigned char mpf_feature4;
     31  unsigned char mpf_feature5;
     32 };
     33 
     34 struct mp_config_table
     35 {
     36  char mpc_signature[4];
     37 #define MPC_SIGNATURE "PCMP"
     38  unsigned short mpc_length;
     39  char mpc_spec;
     40  char mpc_checksum;
     41  char mpc_oem[8];
     42  char mpc_productid[12];
     43  unsigned long mpc_oemptr;
     44  unsigned short mpc_oemsize;
     45  unsigned short mpc_oemcount;
     46  unsigned long mpc_lapic;
     47  unsigned long reserved;
     48 };
     49 
     50 #define MP_PROCESSOR 0
     51 #define MP_BUS 1
     52 #define MP_IOAPIC 2
     53 #define MP_INTSRC 3
     54 #define MP_LINTSRC 4
     55 #define MP_TRANSLATION 192
     56 
     57 struct mpc_config_processor
     58 {
     59  unsigned char mpc_type;
     60  unsigned char mpc_apicid;
     61  unsigned char mpc_apicver;
     62  unsigned char mpc_cpuflag;
     63 #define CPU_ENABLED 1
     64 #define CPU_BOOTPROCESSOR 2
     65  unsigned long mpc_cpufeature;
     66 #define CPU_STEPPING_MASK 0x0F
     67 #define CPU_MODEL_MASK 0xF0
     68 #define CPU_FAMILY_MASK 0xF00
     69  unsigned long mpc_featureflag;
     70  unsigned long mpc_reserved[2];
     71 };
     72 
     73 struct mpc_config_bus
     74 {
     75  unsigned char mpc_type;
     76  unsigned char mpc_busid;
     77  unsigned char mpc_bustype[6];
     78 };
     79 
     80 #define BUSTYPE_EISA "EISA"
     81 #define BUSTYPE_ISA "ISA"
     82 #define BUSTYPE_INTERN "INTERN"
     83 #define BUSTYPE_MCA "MCA"
     84 #define BUSTYPE_VL "VL"
     85 #define BUSTYPE_PCI "PCI"
     86 #define BUSTYPE_PCMCIA "PCMCIA"
     87 #define BUSTYPE_CBUS "CBUS"
     88 #define BUSTYPE_CBUSII "CBUSII"
     89 #define BUSTYPE_FUTURE "FUTURE"
     90 #define BUSTYPE_MBI "MBI"
     91 #define BUSTYPE_MBII "MBII"
     92 #define BUSTYPE_MPI "MPI"
     93 #define BUSTYPE_MPSA "MPSA"
     94 #define BUSTYPE_NUBUS "NUBUS"
     95 #define BUSTYPE_TC "TC"
     96 #define BUSTYPE_VME "VME"
     97 #define BUSTYPE_XPRESS "XPRESS"
     98 
     99 struct mpc_config_ioapic
    100 {
    101  unsigned char mpc_type;
    102  unsigned char mpc_apicid;
    103  unsigned char mpc_apicver;
    104  unsigned char mpc_flags;
    105 #define MPC_APIC_USABLE 0x01
    106  unsigned long mpc_apicaddr;
    107 };
    108 
    109 struct mpc_config_intsrc
    110 {
    111  unsigned char mpc_type;
    112  unsigned char mpc_irqtype;
    113  unsigned short mpc_irqflag;
    114  unsigned char mpc_srcbus;
    115  unsigned char mpc_srcbusirq;
    116  unsigned char mpc_dstapic;
    117  unsigned char mpc_dstirq;
    118 };
    119 
    120 enum mp_irq_source_types {
    121  mp_INT = 0,
    122  mp_NMI = 1,
    123  mp_SMI = 2,
    124  mp_ExtINT = 3
    125 };
    126 
    127 #define MP_IRQDIR_DEFAULT 0
    128 #define MP_IRQDIR_HIGH 1
    129 #define MP_IRQDIR_LOW 3
    130 
    131 struct mpc_config_lintsrc
    132 {
    133  unsigned char mpc_type;
    134  unsigned char mpc_irqtype;
    135  unsigned short mpc_irqflag;
    136  unsigned char mpc_srcbusid;
    137  unsigned char mpc_srcbusirq;
    138  unsigned char mpc_destapic;
    139 #define MP_APIC_ALL 0xFF
    140  unsigned char mpc_destapiclint;
    141 };
    142 
    143 struct mp_config_oemtable
    144 {
    145  char oem_signature[4];
    146 #define MPC_OEM_SIGNATURE "_OEM"
    147  unsigned short oem_length;
    148  char oem_rev;
    149  char oem_checksum;
    150  char mpc_oem[8];
    151 };
    152 
    153 struct mpc_config_translation
    154 {
    155  unsigned char mpc_type;
    156  unsigned char trans_len;
    157  unsigned char trans_type;
    158  unsigned char trans_quad;
    159  unsigned char trans_global;
    160  unsigned char trans_local;
    161  unsigned short trans_reserved;
    162 };
    163 
    164 enum mp_bustype {
    165  MP_BUS_ISA = 1,
    166  MP_BUS_EISA,
    167  MP_BUS_PCI,
    168  MP_BUS_MCA,
    169 };
    170 #endif
    171 
    172