1/*- 2 * Copyright (c) 2008 Marcel Moolenaar 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: stable/10/sys/powerpc/aim/mp_cpudep.c 262675 2014-03-02 02:35:46Z jhibbits $"); |
29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/kernel.h> 33#include <sys/bus.h> 34#include <sys/pcpu.h> 35#include <sys/proc.h> 36#include <sys/smp.h> --- 231 unchanged lines hidden (view full) --- 268void 269cpudep_ap_setup() 270{ 271 register_t reg; 272 uint16_t vers; 273 274 vers = mfpvr() >> 16; 275 |
276 /* The following is needed for restoring from sleep. */ 277#ifdef __powerpc64__ 278 /* Writing to the time base register is hypervisor-privileged */ 279 if (mfmsr() & PSL_HV) 280 mttb(0); 281#else 282 mttb(0); 283#endif |
284 switch(vers) { 285 case IBM970: 286 case IBM970FX: 287 case IBM970MP: 288 /* Set HIOR to 0 */ 289 __asm __volatile("mtspr 311,%0" :: "r"(0)); 290 powerpc_sync(); 291 --- 84 unchanged lines hidden --- |