/*
* 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
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <sys/machtrap.h>
#include <sys/machsystm.h>
#include <sys/cpu_module.h>
#include <vm/hat_sfmmu.h>
#ifdef TRAPTRACE
#include <sys/traptrace.h>
#endif
extern int tudebug;
void
{
switch (X_FAULT_TYPE(sfsr)) {
case FT_NONE:
printf(" No error");
break;
case FT_PRIV:
printf(" Privilege violation");
break;
case FT_SPEC_LD:
printf(" Speculative load on E-bit page");
break;
case FT_ATOMIC_NC:
printf(" Atomic to uncacheable page");
break;
case FT_ILL_ALT:
printf(" Illegal lda or sta");
break;
case FT_NFO:
printf(" Normal access to NFO page");
break;
case FT_RANGE:
printf(" Data or instruction address out of range");
break;
default:
printf(" Unknown error");
break;
}
printf("\n");
}
/*
* Print out debugging info.
*/
/*ARGSUSED*/
void
{
int s;
s = spl7();
switch (type) {
case T_SYS_RTT_ALIGN:
case T_ALIGNMENT:
printf("alignment error:\n");
break;
case T_INSTR_EXCEPTION:
printf("text access exception:\n");
break;
case T_DATA_EXCEPTION:
printf("data access exception:\n");
break;
case T_PRIV_INSTR:
printf("privileged instruction fault:\n");
break;
case T_UNIMP_INSTR:
printf("illegal instruction fault:\n");
break;
case T_IDIV0:
printf("integer divide zero trap:\n");
break;
case T_DIV0:
printf("zero divide trap:\n");
break;
case T_INT_OVERFLOW:
printf("integer overflow:\n");
break;
case T_BREAKPOINT:
printf("breakpoint trap:\n");
break;
case T_TAG_OVERFLOW:
printf("tag overflow:\n");
break;
default:
else
break;
}
} else if (addr) {
}
printf("pid=%d, pc=0x%lx, sp=0x%llx, tstate=0x%llx, context=0x%x\n",
printf("o0-o7: %llx, %llx, %llx, %llx, %llx, %llx, "
}
printf("g1-g7: %llx, %llx, %llx, %llx, %llx, %llx, %llx\n",
debug_enter((char *)NULL);
}
splx(s);
}
static void
{
printf("%%tl %%tpc %%tnpc %%tstate"
" %%tt\n");
for (i = maxtl - 1; i >= 0; i--) {
printf(" %%gl: %02x %%ccr: %02x %%asi: %02x %%cwp: %x "
}
/*
* ptl1_gregs[] array holds global registers for GL 0 through
* current GL. Note that the current GL global registers are
* always stored at index 0 in the ptl1_gregs[] array.
*/
for (i = 0; i <= curgl; i++) {
}
j = rp->ptl1_canrestore;
for (; j >= 0; i--, j--) {
char *sym;
if (i < 0)
i += MAXWIN;
printf("Register window %d, caller %s+%lx\n",
} else {
printf("Register window %d, caller %lx\n",
}
if (i == MAXWIN - 1)
else
printf("%%o0-3: %016lx %016lx %016lx %016lx\n"
"%%o4-7: %016lx %016lx %016lx %016lx\n",
}
printf("%%l0-3: %016lx %016lx %016lx %016lx\n"
"%%l4-7: %016lx %016lx %016lx %016lx\n",
printf("%%i0-3: %016lx %016lx %016lx %016lx\n"
"%%i4-7: %016lx %016lx %016lx %016lx\n",
}
}
void
{
/*
* If ptl1_panic() was called, print out the information
* saved in the ptl1_state struture.
*/
if (pstate->ptl1_entry_count) {
return;
}
tip->trap_mmu_fsr);
}
static void
{
for (i = maxtl - 1; i >= 0; i--) {
}
}
void
{
/*
* If ptl1_panic() was called, save the trap registers
* stored in the ptl1_state struture.
*/
if (pstate->ptl1_entry_count) {
return;
}
}