Back to home page

Quest Cross Reference

 
 

    


Warning, cross-references for /kernel/include/smp/intel_mps.h need to be fixed.

0001 /*                    The Quest Operating System
0002  *  Copyright (C) 2005-2010  Richard West, Boston University
0003  *
0004  *  This program is free software: you can redistribute it and/or modify
0005  *  it under the terms of the GNU General Public License as published by
0006  *  the Free Software Foundation, either version 3 of the License, or
0007  *  (at your option) any later version.
0008  *
0009  *  This program is distributed in the hope that it will be useful,
0010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
0011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0012  *  GNU General Public License for more details.
0013  *
0014  *  You should have received a copy of the GNU General Public License
0015  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
0016  */
0017 
0018 #ifndef _INTEL_MPS_H_
0019 #define _INTEL_MPS_H_
0020 
0021 #include "types.h"
0022 
0023 #define MP_FP_SIGNATURE ('_' | ('M'<<8) | ('P'<<16) | ('_'<<24))
0024 #define MP_CFG_SIGNATURE ('P' | ('C'<<8) | ('M'<<16) | ('P'<<24))
0025 
0026 #define MP_CFG_TYPE_PROCESSOR 0
0027 #define MP_CFG_TYPE_BUS       1
0028 #define MP_CFG_TYPE_IO_APIC   2
0029 #define MP_CFG_TYPE_IO_INT    3
0030 #define MP_CFG_TYPE_LOCAL_INT 4
0031 
0032 struct mp_fp
0033 {
0034   uint32 signature;
0035   uint32 mpconfig_ptr;
0036   uint8 length;
0037   uint8 version;
0038   uint8 checksum;
0039   uint8 features[5];
0040 } PACKED;
0041 
0042 struct mp_config_processor_entry
0043 {
0044   /* type == 0 for processor */
0045   uint8 type;
0046   uint8 APIC_id;
0047   uint8 APIC_version;
0048   uint8 flags;                  /* bits: 0 -> CPU enabled?
0049                                  *       1 -> is BSP?
0050                                  *  others -> unused      */
0051   uint32 CPU_signature;
0052   uint32 CPU_features;
0053   uint8 reserved[8];
0054 } PACKED;
0055 
0056 struct mp_config_bus_entry
0057 {
0058   /* type == 1 for bus */
0059   uint8 type;
0060   uint8 id;
0061   uint8 bus_type[6];
0062 } PACKED;
0063 
0064 struct mp_config_IO_APIC_entry
0065 {
0066   /* type == 2 for IO APIC */
0067   uint8 type;
0068   uint8 id;
0069   uint8 version;
0070   uint8 flags;                  /* bits: 0 -> IO APIC enabled? 
0071                                  *  others -> unused      */
0072   uint32 address;
0073 } PACKED;
0074 
0075 struct mp_config_interrupt_entry
0076 {
0077   /* type == 3 or 4 for IO or local interrupt */
0078   uint8 type;
0079   uint8 int_type;
0080   uint16 flags;
0081   uint8 source_bus_id;
0082   uint8 source_bus_irq;
0083   uint8 dest_APIC_id;
0084   uint8 dest_APIC_intin;
0085 } PACKED;
0086 
0087 struct mp_config_entry
0088 {
0089   union
0090   {
0091     struct mp_config_processor_entry processor;
0092     struct mp_config_bus_entry bus;
0093     struct mp_config_IO_APIC_entry IO_APIC;
0094     struct mp_config_interrupt_entry IO_int;
0095     struct mp_config_interrupt_entry local_int;
0096   } PACKED;
0097 } PACKED;
0098 
0099 struct mp_config
0100 {
0101   uint32 signature;
0102   uint16 base_table_length;
0103   uint8 specification_revision;
0104   uint8 checksum;
0105   uint8 OEM_id[8];
0106   uint8 product_id[12];
0107   uint32 OEM_table_ptr;
0108   uint16 OEM_table_size;
0109   uint16 entry_count;
0110   uint32 local_APIC;
0111   uint16 extended_table_length;
0112   uint8 extended_table_checksum;
0113   uint8 reserved;
0114   struct mp_config_entry entries[];
0115 } PACKED;
0116 
0117 #endif
0118 
0119 /* 
0120  * Local Variables:
0121  * indent-tabs-mode: nil
0122  * mode: C
0123  * c-file-style: "gnu"
0124  * c-basic-offset: 2
0125  * End: 
0126  */
0127 
0128 /* vi: set et sw=2 sts=2: */