Deleted Added
full compact
aim_machdep.c (277411) aim_machdep.c (277498)
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>
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: head/sys/powerpc/aim/machdep.c 277411 2015-01-20 05:28:03Z nwhitehorn $");
58__FBSDID("$FreeBSD: head/sys/powerpc/aim/machdep.c 277498 2015-01-21 19:07:45Z nwhitehorn $");
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>

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

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
240extern void *rstcode, *rstsize;
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>

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

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
240extern void *rstcode, *rstsize;
241extern void *trapcode, *trapsize;
241extern void *trapcode, *trapsize, *trapcode2;
242extern void *slbtrap, *slbtrapsize;
243extern void *alitrap, *alisize;
244extern void *dsitrap, *dsisize;
245extern void *decrint, *decrsize;
246extern void *extint, *extsize;
247extern void *dblow, *dbsize;
248extern void *imisstrap, *imisssize;
249extern void *dlmisstrap, *dlmisssize;

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

501 generictrap = &trapcode;
502 }
503
504 #else /* powerpc64 */
505 cpu_features |= PPC_FEATURE_64;
506 generictrap = &trapcode;
507
508 /* Set TOC base so that the interrupt code can get at it */
242extern void *slbtrap, *slbtrapsize;
243extern void *alitrap, *alisize;
244extern void *dsitrap, *dsisize;
245extern void *decrint, *decrsize;
246extern void *extint, *extsize;
247extern void *dblow, *dbsize;
248extern void *imisstrap, *imisssize;
249extern void *dlmisstrap, *dlmisssize;

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

501 generictrap = &trapcode;
502 }
503
504 #else /* powerpc64 */
505 cpu_features |= PPC_FEATURE_64;
506 generictrap = &trapcode;
507
508 /* Set TOC base so that the interrupt code can get at it */
509 *((void **)TRAP_GENTRAP) = &trapcode2;
509 *((register_t *)TRAP_TOCBASE) = toc;
510 #endif
511
512 bcopy(&rstcode, (void *)(EXC_RST + trap_offset), (size_t)&rstsize);
513
514#ifdef KDB
515 bcopy(&dblow, (void *)(EXC_MCHK + trap_offset), (size_t)&dbsize);
516 bcopy(&dblow, (void *)(EXC_PGM + trap_offset), (size_t)&dbsize);

--- 458 unchanged lines hidden ---
510 *((register_t *)TRAP_TOCBASE) = toc;
511 #endif
512
513 bcopy(&rstcode, (void *)(EXC_RST + trap_offset), (size_t)&rstsize);
514
515#ifdef KDB
516 bcopy(&dblow, (void *)(EXC_MCHK + trap_offset), (size_t)&dbsize);
517 bcopy(&dblow, (void *)(EXC_PGM + trap_offset), (size_t)&dbsize);

--- 458 unchanged lines hidden ---