ao_main.c revision f0b62587229842fad8c5df20795bf9bca17327bd
/*
* 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.
*/
/*
* The CPU module for the AMD Athlon64 and Opteron processors
*/
#include <sys/cpu_module.h>
#include <sys/cpu_module_ms_impl.h>
#include <sys/x86_archext.h>
#include "ao.h"
int ao_ms_support_disable = 0;
/*
* This cpu module supports AMD family 0xf revisions B/C/D/E/F/G. If
* a family 0xf cpu beyond the rev G model limit is detected then
* return ENOTSUP and let the generic x86 CPU module load instead.
*/
int
{
return (ENOTSUP);
if (!(x86_feature & X86_MCA))
return (ENOTSUP);
return (ENOTSUP);
if (!(cap & MCG_CAP_CTL_P))
return (ENOTSUP);
"expected %u: disabling AMD-specific MCA support on "
return (ENOTSUP);
}
/*
* Allocate the chipshared structure if it appears not to have been
* allocated already (by a sibling core). Install the newly
* allocated pointer atomically in case a sibling core beats
* us to it.
*/
}
}
return (0);
}
/*ARGSUSED*/
void
{
(void) ddi_install_driver("mc-amd");
}
ao_ms_init, /* cms_init */
ao_ms_post_startup, /* cms_post_startup */
ao_ms_post_mpstartup, /* cms_post_mpstartup */
NULL, /* cms_logout_size */
ao_ms_mcgctl_val, /* cms_mcgctl_val */
ao_ms_bankctl_skipinit, /* cms_bankctl_skipinit */
ao_ms_bankctl_val, /* cms_bankctl_val */
NULL, /* cms_bankstatus_skipinit */
NULL, /* cms_bankstatus_val */
ao_ms_mca_init, /* cms_mca_init */
ao_ms_poll_ownermask, /* cms_poll_ownermask */
NULL, /* cms_bank_logout */
ao_ms_error_action, /* cms_error_action */
ao_ms_disp_match, /* cms_disp_match */
ao_ms_ereport_class, /* cms_ereport_class */
NULL, /* cms_ereport_detector */
ao_ms_ereport_includestack, /* cms_ereport_includestack */
ao_ms_ereport_add_logout, /* cms_ereport_add_logout */
ao_ms_msrinject, /* cms_msrinject */
NULL, /* cms_fini */
};
};
static struct modlinkage modlinkage = {
(void *)&modlcpu,
};
int
_init(void)
{
return (mod_install(&modlinkage));
}
int
{
}
int
_fini(void)
{
return (mod_remove(&modlinkage));
}