/*
* 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/controlregs.h>
#include <sys/sysevent.h>
#include <sys/pci_cfgspace.h>
#include <sys/mc_intel.h>
#include <sys/cpu_module_impl.h>
#include "intel_nhm.h"
#include "nhm_log.h"
int nhm_patrol_scrub;
int nhm_demand_scrub;
int nhm_no_smbios;
int nhm_smbios_serial;
int nhm_smbios_version;
int nhm_smbios_label;
extern char ecc_enabled;
extern void mem_reg_init(void);
static void
{
int not_unique;
continue;
not_unique = 0;
continue;
sizeof (dimmp->serial_number)) == 0) {
not_unique = 1;
tp->serial_number[0] = 0;
}
}
if (not_unique)
dimmp->serial_number[0] = 0;
}
}
static void
{
sizeof (dimmp->serial_number));
}
sizeof (dimmp->manufacturer));
}
sizeof (dimmp->part_number));
}
}
}
}
struct dimm_slot {
int controller;
int channel;
int dimm;
int max_dimm;
};
static int
{
int slot;
int last_slot;
return (0);
/* skip non existent slot */
return (0);
dsp->controller++;
}
return (0);
}
}
if (dimmp) {
if (nhm_smbios_label)
md.smbmd_dloc);
dimmp);
}
}
dsp->controller++;
}
}
}
return (0);
}
void
{
ds.controller = 0;
}
}
static void
{
}
void
{
int i;
int hw_scrub = 0;
for (i = 0; i < MAX_MEMORY_CONTROLLERS; i++) {
id = MC_CPU_RAS_RD(i);
continue;
if (nhm_demand_scrub &&
(mc_ssrcontrol & DEMAND_SCRUB_ENABLE) == 0) {
}
if (nhm_patrol_scrub == 0)
continue;
* 80000000;
(nhm_memory_on_ctl[i]/64));
hw_scrub = 0;
break;
}
hw_scrub = 1;
}
if (hw_scrub)
}
}
void
{
int i, j, k;
for (i = 0; i < MAX_MEMORY_CONTROLLERS; i++) {
continue;
}
for (j = 0; j < CHANNELS_PER_MEMORY_CONTROLLER; j++) {
for (k = 0; k < MAX_DIMMS_PER_CHANNEL; k++) {
if (DIMMPRESENT(dod)) {
dimmp = (nhm_dimm_t *)
kmem_zalloc(sizeof (nhm_dimm_t),
KM_SLEEP);
"Socket %d channel %d dimm %d",
i, j, k);
nhm_memory_on_ctl[i] +=
}
dimmpp++;
}
}
}
}
int
nhm_init(void)
{
int slot;
/* return ENOTSUP if there is no PCI config space support. */
if (pci_getl_func == NULL)
return (ENOTSUP);
break;
}
if (slot == MAX_CPU_NODES) {
return (ENOTSUP);
}
mem_reg_init();
return (0);
}
int
nhm_reinit(void)
{
mem_reg_init();
return (0);
}
int
{
return (0);
}
void
{
}
void
{
}