The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/i386/include/mptable.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * Copyright (c) 1996, by Steve Passe
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  * 1. Redistributions of source code must retain the above copyright
    9  *    notice, this list of conditions and the following disclaimer.
   10  * 2. The name of the developer may NOT be used to endorse or promote products
   11  *    derived from this software without specific prior written permission.
   12  *
   13  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
   14  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   16  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   17  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   18  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   19  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   20  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   21  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   22  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   23  * SUCH DAMAGE.
   24  *
   25  * $FreeBSD: releng/6.0/sys/i386/include/mptable.h 139790 2005-01-06 22:18:23Z imp $
   26  */
   27 
   28 #ifndef __MACHINE_MPTABLE_H__
   29 #define __MACHINE_MPTABLE_H__
   30 
   31 enum busTypes {
   32     NOBUS = 0,
   33     EISA = 3,
   34     ISA = 6,
   35     MCA = 9,
   36     PCI = 13,
   37     MAX_BUSTYPE = 18,
   38     UNKNOWN_BUSTYPE = 0xff
   39 };
   40 
   41 /* MP Floating Pointer Structure */
   42 typedef struct MPFPS {
   43         char    signature[4];
   44         u_int32_t pap;
   45         u_char  length;
   46         u_char  spec_rev;
   47         u_char  checksum;
   48         u_char  config_type;
   49         u_char  mpfb2;
   50         u_char  mpfb3;
   51         u_char  mpfb4;
   52         u_char  mpfb5;
   53 }      *mpfps_t;
   54 
   55 #define MPFB2_IMCR_PRESENT      0x80
   56 #define MPFB2_MUL_CLK_SRCS      0x40
   57 
   58 /* MP Configuration Table Header */
   59 typedef struct MPCTH {
   60         char    signature[4];
   61         u_short base_table_length;
   62         u_char  spec_rev;
   63         u_char  checksum;
   64         u_char  oem_id[8];
   65         u_char  product_id[12];
   66         u_int32_t oem_table_pointer;
   67         u_short oem_table_size;
   68         u_short entry_count;
   69         u_int32_t apic_address;
   70         u_short extended_table_length;
   71         u_char  extended_table_checksum;
   72         u_char  reserved;
   73 }      *mpcth_t;
   74 
   75 #define MPCT_ENTRY_PROCESSOR    0
   76 #define MPCT_ENTRY_BUS          1
   77 #define MPCT_ENTRY_IOAPIC       2
   78 #define MPCT_ENTRY_INT          3
   79 #define MPCT_ENTRY_LOCAL_INT    4
   80 
   81 typedef struct PROCENTRY {
   82         u_char  type;
   83         u_char  apic_id;
   84         u_char  apic_version;
   85         u_char  cpu_flags;
   86         u_long  cpu_signature;
   87         u_long  feature_flags;
   88         u_long  reserved1;
   89         u_long  reserved2;
   90 }      *proc_entry_ptr;
   91 
   92 #define PROCENTRY_FLAG_EN       0x01
   93 #define PROCENTRY_FLAG_BP       0x02
   94 
   95 typedef struct BUSENTRY {
   96         u_char  type;
   97         u_char  bus_id;
   98         char    bus_type[6];
   99 }      *bus_entry_ptr;
  100 
  101 typedef struct IOAPICENTRY {
  102         u_char  type;
  103         u_char  apic_id;
  104         u_char  apic_version;
  105         u_char  apic_flags;
  106         u_int32_t apic_address;
  107 }      *io_apic_entry_ptr;
  108 
  109 #define IOAPICENTRY_FLAG_EN     0x01
  110 
  111 typedef struct INTENTRY {
  112         u_char  type;
  113         u_char  int_type;
  114         u_short int_flags;
  115         u_char  src_bus_id;
  116         u_char  src_bus_irq;
  117         u_char  dst_apic_id;
  118         u_char  dst_apic_int;
  119 }      *int_entry_ptr;
  120 
  121 #define INTENTRY_TYPE_INT       0
  122 #define INTENTRY_TYPE_NMI       1
  123 #define INTENTRY_TYPE_SMI       2
  124 #define INTENTRY_TYPE_EXTINT    3
  125 
  126 #define INTENTRY_FLAGS_POLARITY                 0x3
  127 #define INTENTRY_FLAGS_POLARITY_CONFORM         0x0
  128 #define INTENTRY_FLAGS_POLARITY_ACTIVEHI        0x1
  129 #define INTENTRY_FLAGS_POLARITY_ACTIVELO        0x3
  130 #define INTENTRY_FLAGS_TRIGGER                  0xc
  131 #define INTENTRY_FLAGS_TRIGGER_CONFORM          0x0
  132 #define INTENTRY_FLAGS_TRIGGER_EDGE             0x4
  133 #define INTENTRY_FLAGS_TRIGGER_LEVEL            0xc
  134 
  135 /* descriptions of MP basetable entries */
  136 typedef struct BASETABLE_ENTRY {
  137         u_char  type;
  138         u_char  length;
  139         char    name[16];
  140 }       basetable_entry;
  141 
  142 int     mptable_pci_probe_table(int bus);
  143 int     mptable_pci_route_interrupt(device_t pcib, device_t dev, int pin);
  144 
  145 #endif /* !__MACHINE_MPTABLE_H__ */

Cache object: c62fa3daa0571fda71533af3a7cad208


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.