/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* This plugin supports debugging functionality unique to Intel processors based
* on the P6 core (Pentium Pro, Pentium II, and Pentium III). It does not
* support the Pentium M processor, which uses a P4-style branch trace stack.
* The Pentium M is supported by the P4 plugin.
*/
#include <kmdb/kvm_cpu_impl.h>
#include <kmdb/kmdb_dpi.h>
#include <kmdb/kmdb_kdi.h>
#include <sys/x86_archext.h>
typedef struct kmt_cpu_p6 {
} kmt_cpu_p6_t;
/*
* The debugctl value in this struct needs to outlive the destruction of the
* kmt_cpu_t. It needs to be around for the final exit from the debugger so
* we can do the final write of the debugctl MSR.
*/
static void
{
}
/*ARGSUSED*/
static int
{
return (DCMD_USAGE);
return (0);
}
/*
* MSRs that we want to track. These will be read each time the debugger is
* entered.
*/
{ MSR_LBR_TO, KDI_MSR_READ },
{ MSR_LBR_FROM, KDI_MSR_READ },
{ MSR_LEX_TO, KDI_MSR_READ },
{ MSR_LEX_FROM, KDI_MSR_READ },
{ NULL }
};
/*ARGSUSED*/
static void
{
/* Leave LBR on */
}
/*ARGSUSED*/
static const char *
{
return ("Intel P6 family (Pentium Pro, Pentium II, Pentium III)");
}
/*ARGSUSED*/
static void
{
}
/* Enable branch stepping, to be disabled on the next debugger entry */
static int
{
(void) kmdb_dpi_set_register("eflags",
return (mdb_tgt_add_fault(t, KMT_TRAP_ALL,
kmt_p6_btf_clear, p6));
}
};
{ NULL }
};
/* See 07/04 AP-485 Intel Processor Identification and the CPUID Instruction */
{
return (NULL); /* errno is set for us */
return (NULL);
}
return (cpu);
}