starcat.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* 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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_STARCAT_H
#define _SYS_STARCAT_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Manifest constants of Starcat configuration
*/
#define STARCAT_SLOT1_MEM_MAX 0 /* max mem units per slot 1 bd */
#define STARCAT_SLOT0_IO_MAX 0 /* max I/O ctrlrs per slot 0 bd */
/* max prealloc spare tsb's */
#define STARCAT_SPARE_TSB_MAX \
/*
* Data bearing mondo vector (DMV) support
*
* For Starcat, we need to add a few extra "hardware" dmv interrupts.
* These actually do not correspond to physical hardware but are used
* by Starcat IDN.
*/
#define STARCAT_DMV_EXTRA 4
#define STARCAT_DMV_IDN_BASE (MAX_UPA)
/*
* Macros for manipulating CPU IDs
*/
#define STARCAT_CPUID_TO_PORTID(p) ((p) & ~0x4)
#define STARCAT_CPUID_TO_AGENT(p) ((p) & 0x7)
#define STARCAT_CPUID_TO_LPORT(p) ((p) & 0x3)
#define MAKE_CPUID(e, s, a) \
((((e) & 0x1f) << 5) | (((s) & 0x1) << 3) | ((a) & 0x7))
/*
* Definitions for decoding memory controller registers. These values
* are taken from Chapter 9 of the SPARCV9 JSP-1 US-III implementation
* supplement.
*/
/* Starcat has four banks of memory per MC */
#define MAX_BANKS_PER_MC (4)
/* Use only low bits for local CPU MC ASI */
#define MC_OFFSET_MASK (0xffu)
/* Shifts to access specific fields of the memdecode register */
/* Extract upper mask field from the decode register */
/* Extract upper match field from memdecode register */
/* Size of the range covered by the address mask field */
/* The base PA the memdecode register will respond to */
/*
* Prototypes for functions
*/
extern int set_platform_max_ncpus(void);
extern int plat_max_boards(void);
extern int plat_max_cpu_units_per_board(void);
extern int plat_max_mem_units_per_board(void);
extern int plat_max_io_units_per_board(void);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_STARCAT_H */