19d5a22b9SMarcel Moolenaar /*- 29d5a22b9SMarcel Moolenaar * Copyright (c) 2008 Marcel Moolenaar 39d5a22b9SMarcel Moolenaar * All rights reserved. 49d5a22b9SMarcel Moolenaar * 59d5a22b9SMarcel Moolenaar * Redistribution and use in source and binary forms, with or without 69d5a22b9SMarcel Moolenaar * modification, are permitted provided that the following conditions 79d5a22b9SMarcel Moolenaar * are met: 89d5a22b9SMarcel Moolenaar * 99d5a22b9SMarcel Moolenaar * 1. Redistributions of source code must retain the above copyright 109d5a22b9SMarcel Moolenaar * notice, this list of conditions and the following disclaimer. 119d5a22b9SMarcel Moolenaar * 2. Redistributions in binary form must reproduce the above copyright 129d5a22b9SMarcel Moolenaar * notice, this list of conditions and the following disclaimer in the 139d5a22b9SMarcel Moolenaar * documentation and/or other materials provided with the distribution. 149d5a22b9SMarcel Moolenaar * 159d5a22b9SMarcel Moolenaar * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 169d5a22b9SMarcel Moolenaar * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 179d5a22b9SMarcel Moolenaar * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 189d5a22b9SMarcel Moolenaar * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 199d5a22b9SMarcel Moolenaar * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 209d5a22b9SMarcel Moolenaar * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 219d5a22b9SMarcel Moolenaar * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 229d5a22b9SMarcel Moolenaar * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 239d5a22b9SMarcel Moolenaar * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 249d5a22b9SMarcel Moolenaar * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 259d5a22b9SMarcel Moolenaar * 269d5a22b9SMarcel Moolenaar * $FreeBSD$ 27d27f1d4cSBenno Rice */ 289d5a22b9SMarcel Moolenaar 299d5a22b9SMarcel Moolenaar #ifndef _MACHINE_SMP_H_ 309d5a22b9SMarcel Moolenaar #define _MACHINE_SMP_H_ 319d5a22b9SMarcel Moolenaar 329d5a22b9SMarcel Moolenaar #ifdef _KERNEL 339d5a22b9SMarcel Moolenaar 349d5a22b9SMarcel Moolenaar #define IPI_AST 0 359d5a22b9SMarcel Moolenaar #define IPI_PREEMPT 1 369d5a22b9SMarcel Moolenaar #define IPI_RENDEZVOUS 2 379d5a22b9SMarcel Moolenaar #define IPI_STOP 3 38dc6fbf65SAttilio Rao #define IPI_STOP_HARD 3 399d5a22b9SMarcel Moolenaar 409d5a22b9SMarcel Moolenaar #ifndef LOCORE 419d5a22b9SMarcel Moolenaar 429d5a22b9SMarcel Moolenaar void ipi_all_but_self(int ipi); 439d5a22b9SMarcel Moolenaar void ipi_selected(cpumask_t cpus, int ipi); 449d5a22b9SMarcel Moolenaar 459d5a22b9SMarcel Moolenaar struct cpuref { 469d5a22b9SMarcel Moolenaar uintptr_t cr_hwref; 479d5a22b9SMarcel Moolenaar u_int cr_cpuid; 489d5a22b9SMarcel Moolenaar }; 499d5a22b9SMarcel Moolenaar 50c139f23dSMarcel Moolenaar void pmap_cpu_bootstrap(int); 51c139f23dSMarcel Moolenaar uint32_t cpudep_ap_bootstrap(void); 52c139f23dSMarcel Moolenaar void machdep_ap_bootstrap(void); 539d5a22b9SMarcel Moolenaar 549d5a22b9SMarcel Moolenaar #endif /* !LOCORE */ 559d5a22b9SMarcel Moolenaar #endif /* _KERNEL */ 569d5a22b9SMarcel Moolenaar #endif /* !_MACHINE_SMP_H */ 57