cmp.c revision 8949bcd619d78e849deef983cb8310bc3aa3e242
/*
* 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
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/machsystm.h>
#include <sys/cheetahregs.h>
/*
* Note: We assume that chipid == portid. This is not necessarily true.
* We buried it down here in the implementation, and not in the
* interfaces, so that we can change it later.
*/
/*
* pre-alloc'ed because this is used early in boot (before the memory
* allocator is available).
*/
/*
* Returns 1 if cpuid is CMP-capable, 0 otherwise.
*/
int
{
/* N.B. We're assuming that the cpunode[].portid is still intact */
}
/*
* Indicate that this core (cpuid) resides on the chip indicated by chipid.
* Called during boot and DR add.
*/
void
{
}
/*
* Indicate that this core (cpuid) is being DR removed.
*/
void
{
/* N.B. We're assuming that the cpunode[].portid is still intact */
}
/*
* Called when cpuid is being onlined or offlined. If the offlined
* processor is CMP-capable then current target of the CMP Error Steering
* Register is set to either the lowest numbered on-line sibling core, if
* one exists, or else to this core.
*/
void
{
int i;
if (!cmp_cpu_is_cmp(cpuid))
return;
/* Look for an online sibling core */
for (i = 0; i < NCPU; i++) {
if (i == cpuid)
continue;
if (CPU_IN_SET(mycores, i) &&
/* Found one, reset error steering */
break;
}
}
/* No online sibling cores, point to this core. */
if (i == NCPU) {
}
}
{
if (!cmp_cpu_is_cmp(cpuid)) {
/* This CPU is not a CMP, so by definition chipid==cpuid */
return (cpuid);
}
/* N.B. We're assuming that the cpunode[].portid is still intact */
}
/*
* Return a chip "id" for the given cpu_t
* cpu_t's residing on the same physical processor
* should map to the same "id"
*/
{
}
/*
* We don't have any multi-threaded cores on sun4u yet.
*/
{
}
void
{
int impl;
/*
* Define the chip's type
*/
} else if (IS_PANTHER(impl)) {
} else {
}
/*
* Define any needed adjustment of rechoose_interval
* For now, all chips use the default. This
* will change with future processors.
*/
cd->chipd_rechoose_adj = 0;
}