diff options
author | gonzo <gonzo@FreeBSD.org> | 2012-03-24 04:52:18 +0000 |
---|---|---|
committer | gonzo <gonzo@FreeBSD.org> | 2012-03-24 04:52:18 +0000 |
commit | 71511943f0995bf8670e6d4be48569a97ad0430d (patch) | |
tree | df5997d309589b6a65fce19a28a675d309cf5a2b /sys/cddl | |
parent | 58eb4eb2a1f6de2f39cfa02526945469e41fd4bc (diff) | |
download | FreeBSD-src-71511943f0995bf8670e6d4be48569a97ad0430d.zip FreeBSD-src-71511943f0995bf8670e6d4be48569a97ad0430d.tar.gz |
Add MIPS support to cddl/contrib part:
- header and stub .c file for fasttrap module. It's not supported on
MIPS yet, but there is no way to disable support completely
- Do as amd64 trying to limit allocated memory
Diffstat (limited to 'sys/cddl')
3 files changed, 80 insertions, 2 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c index ebba983..4e07828 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c +++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c @@ -235,7 +235,7 @@ static dtrace_dynvar_t dtrace_dynhash_sink; /* end of dynamic hash chains */ static struct mtx dtrace_unr_mtx; MTX_SYSINIT(dtrace_unr_mtx, &dtrace_unr_mtx, "Unique resource identifier", MTX_DEF); int dtrace_in_probe; /* non-zero if executing a probe */ -#if defined(__i386__) || defined(__amd64__) +#if defined(__i386__) || defined(__amd64__) || defined(__mips__) uintptr_t dtrace_in_probe_addr; /* Address of invop when already in probe */ #endif #endif @@ -10659,7 +10659,7 @@ err: #else int i; -#if defined(__amd64__) +#if defined(__amd64__) || defined(__mips__) /* * FreeBSD isn't good at limiting the amount of memory we * ask to malloc, so let's place a limit here before trying diff --git a/sys/cddl/contrib/opensolaris/uts/mips/dtrace/fasttrap_isa.c b/sys/cddl/contrib/opensolaris/uts/mips/dtrace/fasttrap_isa.c new file mode 100644 index 0000000..a31eac8 --- /dev/null +++ b/sys/cddl/contrib/opensolaris/uts/mips/dtrace/fasttrap_isa.c @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +/* + * XXX: Placeholder for MIPS fasttrap code + */ diff --git a/sys/cddl/contrib/opensolaris/uts/mips/sys/fasttrap_isa.h b/sys/cddl/contrib/opensolaris/uts/mips/sys/fasttrap_isa.h new file mode 100644 index 0000000..eb99752 --- /dev/null +++ b/sys/cddl/contrib/opensolaris/uts/mips/sys/fasttrap_isa.h @@ -0,0 +1,48 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _FASTTRAP_ISA_H +#define _FASTTRAP_ISA_H + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include <sys/types.h> + +#ifdef __cplusplus +extern "C" { +#endif +/* + * XXXDTRACE: placehodler for MIPS fasttrap stuff + */ + +typedef uint32_t fasttrap_instr_t; +#define FASTTRAP_SUNWDTRACE_SIZE 64 + +#ifdef __cplusplus +} +#endif + +#endif /* _FASTTRAP_ISA_H */ |