Deleted Added
sdiff udiff text old ( 259235 ) new ( 262675 )
full compact
1/*-
2 * Copyright (C) 1995, 1996 Wolfgang Solfrank.
3 * Copyright (C) 1995, 1996 TooLs GmbH.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 41 unchanged lines hidden (view full) ---

50 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
51 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
52 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
53 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54 * $NetBSD: machdep.c,v 1.74.2.1 2000/11/01 16:13:48 tv Exp $
55 */
56
57#include <sys/cdefs.h>
58__FBSDID("$FreeBSD: stable/10/sys/powerpc/aim/machdep.c 259235 2013-12-11 22:36:20Z andreast $");
59
60#include "opt_compat.h"
61#include "opt_ddb.h"
62#include "opt_kstack_pages.h"
63#include "opt_platform.h"
64
65#include <sys/param.h>
66#include <sys/proc.h>

--- 70 unchanged lines hidden (view full) ---

137#ifdef __powerpc64__
138extern int n_slbs;
139int cacheline_size = 128;
140#else
141int cacheline_size = 32;
142#endif
143int hw_direct_map = 1;
144
145struct pcpu __pcpu[MAXCPU];
146
147static struct trapframe frame0;
148
149char machine[] = "powerpc";
150SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, "");
151
152static void cpu_startup(void *);

--- 79 unchanged lines hidden (view full) ---

232#ifndef __powerpc64__
233/* Bits for running on 64-bit systems in 32-bit mode. */
234extern void *testppc64, *testppc64size;
235extern void *restorebridge, *restorebridgesize;
236extern void *rfid_patch, *rfi_patch1, *rfi_patch2;
237extern void *trapcode64;
238#endif
239
240#ifdef SMP
241extern void *rstcode, *rstsize;
242#endif
243extern void *trapcode, *trapsize;
244extern void *slbtrap, *slbtrapsize;
245extern void *alitrap, *alisize;
246extern void *dsitrap, *dsisize;
247extern void *decrint, *decrsize;
248extern void *extint, *extsize;
249extern void *dblow, *dbsize;
250extern void *imisstrap, *imisssize;

--- 237 unchanged lines hidden (view full) ---

488 generictrap = &trapcode;
489 }
490
491 #else /* powerpc64 */
492 cpu_features |= PPC_FEATURE_64;
493 generictrap = &trapcode;
494 #endif
495
496#ifdef SMP
497 bcopy(&rstcode, (void *)(EXC_RST + trap_offset), (size_t)&rstsize);
498#else
499 bcopy(generictrap, (void *)EXC_RST, (size_t)&trapsize);
500#endif
501
502#ifdef KDB
503 bcopy(&dblow, (void *)(EXC_MCHK + trap_offset), (size_t)&dbsize);
504 bcopy(&dblow, (void *)(EXC_PGM + trap_offset), (size_t)&dbsize);
505 bcopy(&dblow, (void *)(EXC_TRC + trap_offset), (size_t)&dbsize);
506 bcopy(&dblow, (void *)(EXC_BPT + trap_offset), (size_t)&dbsize);
507#else
508 bcopy(generictrap, (void *)EXC_MCHK, (size_t)&trapsize);

--- 274 unchanged lines hidden (view full) ---

783
784uint64_t
785va_to_vsid(pmap_t pm, vm_offset_t va)
786{
787 return ((pm->pm_sr[(uintptr_t)va >> ADDR_SR_SHFT]) & SR_VSID_MASK);
788}
789
790#endif