/*
* 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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Starfire Memory Controller specific routines.
*/
#include <sys/dditypes.h>
#include <sys/ddi_impldefs.h>
#include <sys/machsystm.h>
#include <sys/starfire.h>
struct mc_dimm_table {
int mc_type;
};
{ 4, 8 },
{ 6, 8 },
{ 11, 32 },
{ 15, 128 },
{ 0, 0 }
};
struct mc_seg_size {
};
{ 0, 0 }
};
/*
* Alignment of memory between MC's.
*/
{
return (STARFIRE_MC_MEMBOARD_ALIGNMENT);
}
{
int rlen;
if (rlen != sizeof (struct sf_memunit_regspec))
return ((uint64_t)-1);
return ((uint64_t)-1);
return (STARFIRE_MC_ASR_ADDR(psi_addr));
}
{
int rlen;
if (rlen != sizeof (struct sf_memunit_regspec))
return ((uint64_t)-1);
return ((uint64_t)-1);
return (STARFIRE_MC_IDLE_ADDR(psi_addr));
}
int
{
int i, rlen;
if (rlen != sizeof (struct sf_memunit_regspec))
return (-1);
return (-1);
return (-1);
for (i = 0; dimmsize_table[i].mc_type != 0; i++)
break;
return (dimmsize_table[i].mc_module_size);
}
{
int i, rlen;
if (rlen != sizeof (struct sf_memunit_regspec))
return (-1);
return (-1);
return (-1);
for (i = 0; mc_seg_table[i].seg_size != 0; i++)
break;
if (mc_seg_table[i].seg_size == 0)
else
#ifdef DEBUG
printf("nodeid %x, mc asr addr %lx, val %x, seg_sz_mask %x, "
#endif /* DEBUG */
return (seg_sz - 1);
}
int
{
*mcregp = 0;
return (-1);
return (0);
}
int
{
return (-1);
}
{
/*
* Remove memory present bit.
*/
/*
* Get mask for bits 32-26.
*/
return (pa);
}
{
/*
* Get mask for bits 32-26.
*/
return (masr);
}