Back to home page

Quest Cross Reference

 
 

    


Warning, cross-references for /kernel/include/smp/smp.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 _SMP_H_
0019 #define _SMP_H_
0020 
0021 #include "types.h"
0022 #include "kernel.h"
0023 
0024 #define MP_BOOTADDR 0x70000
0025 
0026 #ifndef __ASSEMBLER__
0027 
0028 typedef struct
0029 {
0030   uint8 id;
0031   uint32 address, startGSI, numGSIs;
0032 } mp_IOAPIC_info;
0033 
0034 typedef struct
0035 {
0036   uint32 src_bus, src_IRQ, dest_GSI;
0037 } mp_int_override;
0038 
0039 extern uint32 cpu_bus_freq;
0040 extern uint64 tsc_freq;
0041 
0042 int smp_init (void);
0043 void smp_secondary_init (void);
0044 void smp_enable_scheduling (void);
0045 uint32 smp_boot_cpu (uint8 apic_id, uint8 version);
0046 
0047 extern uint8 CPU_to_APIC[MAX_CPUS];
0048 extern uint8 APIC_to_CPU[MAX_CPUS];
0049        
0050 extern uint32 mp_num_cpus;
0051 extern bool mp_ISA_PC;
0052 extern bool mp_apic_mode;
0053 
0054 #define MAX_INT_OVERRIDES 128
0055 
0056 uint32 IRQ_to_GSI (uint32 bus, uint32 irq);
0057 
0058 #endif /* ifndef __ASSEMBLER__ */
0059 
0060 #endif
0061 
0062 /* 
0063  * Local Variables:
0064  * indent-tabs-mode: nil
0065  * mode: C
0066  * c-file-style: "gnu"
0067  * c-basic-offset: 2
0068  * End: 
0069  */
0070 
0071 /* vi: set et sw=2 sts=2: */