More multi-threaded support for virtualization. Move the save context
[dragonfly.git] / sys / platform / vkernel / i386 / mp.c
blobeadab732a57f11e8f04b085b93a301e863b85b1e
1 /*
2 * Copyright (c) 2007 The DragonFly Project. All rights reserved.
4 * This code is derived from software contributed to The DragonFly Project
5 * by Matthew Dillon <dillon@backplane.com>
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in
15 * the documentation and/or other materials provided with the
16 * distribution.
17 * 3. Neither the name of The DragonFly Project nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific, prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
29 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
31 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
34 * $DragonFly: src/sys/platform/vkernel/i386/mp.c,v 1.1 2007/06/18 18:57:12 josepht Exp $
37 #include <sys/interrupt.h>
38 #include <sys/types.h>
40 #include <machine/cpufunc.h>
41 #include <machine/smp.h>
43 #if 0
44 volatile lapic_t lapic; /* needed for kern/kern_shutdown.c */
45 #endif
46 volatile u_int stopped_cpus;
47 cpumask_t smp_active_mask = 1; /* which cpus are ready for IPIs etc? */
48 #if 0
49 u_int mp_lock;
50 #endif
52 void
53 mp_start(void)
55 panic("XXX mp_start()");
58 void
59 mp_announce(void)
61 panic("XXX mp_announce()");
64 #if 0
65 void
66 get_mplock(void)
68 panic("XXX get_mplock()");
71 int
72 try_mplock(void)
74 panic("XXX try_mplock()");
77 void
78 rel_mplock(void)
80 panic("XXX rel_mplock()");
83 int
84 cpu_try_mplock(void)
86 panic("XXX cpu_try_mplock()");
88 void
89 cpu_get_initial_mplock(void)
91 panic("XXX cpu_get_initial_mplock()");
93 #endif
96 void
97 forward_fastint_remote(void *arg)
99 panic("XXX forward_fastint_remote()");
102 void
103 cpu_send_ipiq(int dcpu)
105 panic("XXX cpu_send_ipiq()");
108 void
109 smp_invltlb(void)
111 #ifdef SMP
112 panic("XXX smp_invltlb()");
113 #endif
117 stop_cpus(u_int map)
119 panic("XXX stop_cpus()");
123 restart_cpus(u_int map)
125 panic("XXX restart_cpus()");
128 void
129 ap_init(void)
131 panic("XXX ap_init()");