mps.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2001-2004 Jakub Jermar
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  *
00009  * - Redistributions of source code must retain the above copyright
00010  *   notice, this list of conditions and the following disclaimer.
00011  * - Redistributions in binary form must reproduce the above copyright
00012  *   notice, this list of conditions and the following disclaimer in the
00013  *   documentation and/or other materials provided with the distribution.
00014  * - The name of the author may not be used to endorse or promote products
00015  *   derived from this software without specific prior written permission.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
00018  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00019  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00020  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
00021  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
00022  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00023  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00024  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00025  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
00026  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00027  */
00028 
00035 #ifndef __MPS_H__
00036 #define __MPS_H__
00037 
00038 #include <arch/types.h>
00039 #include <typedefs.h>
00040 #include <synch/waitq.h>
00041 #include <config.h>
00042 #include <arch/smp/smp.h>
00043 
00044 #define CT_EXT_ENTRY_TYPE               0
00045 #define CT_EXT_ENTRY_LEN                1
00046 
00047 struct mps_fs {
00048         __u32 signature;
00049         __u32 configuration_table;
00050         __u8 length;
00051         __u8 revision;
00052         __u8 checksum;
00053         __u8 config_type;
00054         __u8 mpfib2;
00055         __u8 mpfib3;
00056         __u8 mpfib4;
00057         __u8 mpfib5;
00058 } __attribute__ ((packed));
00059 
00060 struct mps_ct {
00061         __u32 signature;
00062         __u16 base_table_length;
00063         __u8 revision;
00064         __u8 checksum;
00065         __u8 oem_id[8];
00066         __u8 product_id[12];
00067         __u32 oem_table;
00068         __u16 oem_table_size;
00069         __u16 entry_count;
00070         __u32 l_apic;
00071         __u16 ext_table_length;
00072         __u8 ext_table_checksum;
00073         __u8 xxx;
00074         __u8 base_table[0];
00075 } __attribute__ ((packed));
00076 
00077 struct __processor_entry {
00078         __u8 type;
00079         __u8 l_apic_id;
00080         __u8 l_apic_version;
00081         __u8 cpu_flags;
00082         __u8 cpu_signature[4];
00083         __u32 feature_flags;
00084         __u32 xxx[2];
00085 } __attribute__ ((packed));
00086 
00087 struct __bus_entry {
00088         __u8 type;
00089         __u8 bus_id;
00090         __u8 bus_type[6];
00091 } __attribute__ ((packed));
00092 
00093 struct __io_apic_entry {
00094         __u8 type;
00095         __u8 io_apic_id;
00096         __u8 io_apic_version;
00097         __u8 io_apic_flags;
00098         __u32 io_apic;
00099 } __attribute__ ((packed));
00100 
00101 struct __io_intr_entry {
00102         __u8 type;
00103         __u8 intr_type;
00104         __u8 poel;
00105         __u8 xxx;
00106         __u8 src_bus_id;
00107         __u8 src_bus_irq;
00108         __u8 dst_io_apic_id;
00109         __u8 dst_io_apic_pin;
00110 } __attribute__ ((packed));
00111 
00112 struct __l_intr_entry {
00113         __u8 type;
00114         __u8 intr_type;
00115         __u8 poel;
00116         __u8 xxx;
00117         __u8 src_bus_id;
00118         __u8 src_bus_irq;
00119         __u8 dst_l_apic_id;
00120         __u8 dst_l_apic_pin;
00121 } __attribute__ ((packed));
00122 
00123 
00124 extern waitq_t ap_completion_wq;
00125 
00126 extern struct smp_config_operations mps_config_operations;
00127 
00128 extern void mps_init(void);
00129 extern void kmp(void *arg);
00130 
00131 #endif
00132 

Generated on Sun Jun 18 16:38:50 2006 for HelenOS Kernel (ia32) by  doxygen 1.4.6