17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*2f0fcb93SJason Beloro * Common Development and Distribution License (the "License"). 6*2f0fcb93SJason Beloro * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22*2f0fcb93SJason Beloro * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate #ifndef _SYS_TRAP_H 277c478bd9Sstevel@tonic-gate #define _SYS_TRAP_H 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate #ifdef __cplusplus 307c478bd9Sstevel@tonic-gate extern "C" { 317c478bd9Sstevel@tonic-gate #endif 327c478bd9Sstevel@tonic-gate 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gate /* 357c478bd9Sstevel@tonic-gate * This file is machine specific as is. 367c478bd9Sstevel@tonic-gate * Some trap types could be made common 377c478bd9Sstevel@tonic-gate * for all sparcs, but that is a project 387c478bd9Sstevel@tonic-gate * in and of itself. 397c478bd9Sstevel@tonic-gate */ 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gate /* 427c478bd9Sstevel@tonic-gate * Software traps (ticc instructions). 437c478bd9Sstevel@tonic-gate */ 447c478bd9Sstevel@tonic-gate #define ST_OSYSCALL 0x00 457c478bd9Sstevel@tonic-gate #define ST_BREAKPOINT 0x01 467c478bd9Sstevel@tonic-gate #define ST_DIV0 0x02 477c478bd9Sstevel@tonic-gate #define ST_FLUSH_WINDOWS 0x03 487c478bd9Sstevel@tonic-gate #define ST_CLEAN_WINDOWS 0x04 497c478bd9Sstevel@tonic-gate #define ST_RANGE_CHECK 0x05 507c478bd9Sstevel@tonic-gate #define ST_FIX_ALIGN 0x06 517c478bd9Sstevel@tonic-gate #define ST_INT_OVERFLOW 0x07 527c478bd9Sstevel@tonic-gate #define ST_SYSCALL 0x08 53*2f0fcb93SJason Beloro #define ST_TRANSACTION_FAILURE 0x0F 547c478bd9Sstevel@tonic-gate 557c478bd9Sstevel@tonic-gate /* 567c478bd9Sstevel@tonic-gate * Software trap vectors 16 - 31 are reserved for use by the user 577c478bd9Sstevel@tonic-gate * and will not be usurped by Sun. 587c478bd9Sstevel@tonic-gate */ 597c478bd9Sstevel@tonic-gate 607c478bd9Sstevel@tonic-gate #define ST_GETCC 0x20 617c478bd9Sstevel@tonic-gate #define ST_SETCC 0x21 627c478bd9Sstevel@tonic-gate #define ST_GETPSR 0x22 637c478bd9Sstevel@tonic-gate #define ST_SETPSR 0x23 647c478bd9Sstevel@tonic-gate #define ST_GETHRTIME 0x24 657c478bd9Sstevel@tonic-gate #define ST_GETHRVTIME 0x25 667c478bd9Sstevel@tonic-gate #define ST_SELFXCALL 0x26 677c478bd9Sstevel@tonic-gate #define ST_GETHRESTIME 0x27 687c478bd9Sstevel@tonic-gate #define ST_SETV9STACK 0x28 697c478bd9Sstevel@tonic-gate #define ST_GETLGRP 0x29 707c478bd9Sstevel@tonic-gate 717c478bd9Sstevel@tonic-gate /* 727c478bd9Sstevel@tonic-gate * DTrace traps used for user-land tracing. 737c478bd9Sstevel@tonic-gate */ 747c478bd9Sstevel@tonic-gate #define ST_DTRACE_PID 0x38 757c478bd9Sstevel@tonic-gate #define ST_DTRACE_PROBE 0x39 767c478bd9Sstevel@tonic-gate #define ST_DTRACE_RETURN 0x3a 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gate #define ST_KMDB_TRAP 0x7d 797c478bd9Sstevel@tonic-gate #define ST_KMDB_BREAKPOINT 0x7e 807c478bd9Sstevel@tonic-gate #define ST_MON_BREAKPOINT 0x7f 817c478bd9Sstevel@tonic-gate 827c478bd9Sstevel@tonic-gate #ifdef __cplusplus 837c478bd9Sstevel@tonic-gate } 847c478bd9Sstevel@tonic-gate #endif 857c478bd9Sstevel@tonic-gate 867c478bd9Sstevel@tonic-gate #endif /* _SYS_TRAP_H */ 87