03831d35f7499c87d51205817c93e9a8d42c4baestevel * CDDL HEADER START
03831d35f7499c87d51205817c93e9a8d42c4baestevel * The contents of this file are subject to the terms of the
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Common Development and Distribution License (the "License").
03831d35f7499c87d51205817c93e9a8d42c4baestevel * You may not use this file except in compliance with the License.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
03831d35f7499c87d51205817c93e9a8d42c4baestevel * See the License for the specific language governing permissions
03831d35f7499c87d51205817c93e9a8d42c4baestevel * and limitations under the License.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * When distributing Covered Code, include this CDDL HEADER in each
03831d35f7499c87d51205817c93e9a8d42c4baestevel * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * If applicable, add the following below this CDDL HEADER, with the
03831d35f7499c87d51205817c93e9a8d42c4baestevel * fields enclosed by brackets "[]" replaced with your own identifying
03831d35f7499c87d51205817c93e9a8d42c4baestevel * information: Portions Copyright [yyyy] [name of copyright owner]
03831d35f7499c87d51205817c93e9a8d42c4baestevel * CDDL HEADER END
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Use is subject to license terms.
03831d35f7499c87d51205817c93e9a8d42c4baestevel#pragma ident "%Z%%M% %I% %E% SMI"
03831d35f7499c87d51205817c93e9a8d42c4baestevelextern "C" {
03831d35f7499c87d51205817c93e9a8d42c4baestevel * The following keys are in I/O SRAM TOC
03831d35f7499c87d51205817c93e9a8d42c4baestevel * and used by the OS and SC-APP
03831d35f7499c87d51205817c93e9a8d42c4baestevel * These are mapped to the numeric values below
03831d35f7499c87d51205817c93e9a8d42c4baestevel * NB These must be kept in sync with POST/SC keys.
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define TOCKEY_DOMSTAT "DOMSTAT" /* SBBC_DOMAIN_KEY */
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define TOCKEY_KEYSWPO "KEYSWPO" /* SBBC_KEYSWITCH_KEY */
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define TOCKEY_SOLCONS "SOLCONS" /* SBBC_CONSOLE_KEY */
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define TOCKEY_SOLMBOX "SOLMBOX" /* SBBC_MAILBOX_KEY */
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define TOCKEY_SOLSCIR "SOLSCIR" /* SBBC_INTR_SC_KEY */
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define TOCKEY_SCSOLIR "SCSOLIR" /* SBBC_SC_INTR_KEY */
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define TOCKEY_ENVINFO "ENVINFO" /* SBBC_ENVCTRL_KEY */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Interrupts enabled that SC can send to OS
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define TOCKEY_SOLSCIE "SOLSCIE" /* SBBC_SC_INTR_ENABLED_KEY */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Interrupts enabled that OS can send to SC
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define TOCKEY_SCSOLIE "SCSOLIE" /* SBBC_INTR_SC_ENABLED_KEY */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * CPU/Domain signatures block
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define TOCKEY_SIGBLCK "SIGBLCK" /* SBBC_SIGBLCK_KEY */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * different sram types
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define INVALID_KEY(tunnel, x) (tunnel->tunnel_keys[(x)].key == 0)
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Macros used for version checking
03831d35f7499c87d51205817c93e9a8d42c4baestevel * The SBBC driver will check the major version number in the IOSRAM
03831d35f7499c87d51205817c93e9a8d42c4baestevel * TOC entry. If the major version number in the TOC entry is larger
03831d35f7499c87d51205817c93e9a8d42c4baestevel * than the maximum number Solaris supports, Solaris will panic.
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define IOSRAM_TOC_VER_SHIFT 0x8 /* top 8 bit for major */
03831d35f7499c87d51205817c93e9a8d42c4baestevel#define IOSRAM_TOC_VER_MASK 0xff /* 8-bit for major, 8-bit for minor */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * IOSRAM/TOC propertes on chosen node
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Global IOSRAM lock
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Tunnel lock to synchronize IOSRAM access
03831d35f7499c87d51205817c93e9a8d42c4baestevel * 'chosen' SBBC
03831d35f7499c87d51205817c93e9a8d42c4baestevel * pointer to an array of SBBC_MAX_KEYS tunnel entries
03831d35f7499c87d51205817c93e9a8d42c4baestevel * interrupt handlers
03831d35f7499c87d51205817c93e9a8d42c4baestevelextern void iosram_init(void);
03831d35f7499c87d51205817c93e9a8d42c4baestevelextern void iosram_fini(void);
03831d35f7499c87d51205817c93e9a8d42c4baestevelextern int sgsbbc_iosram_is_chosen(sbbc_softstate_t *);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * tunnel switch related routines
03831d35f7499c87d51205817c93e9a8d42c4baestevelextern int sgsbbc_iosram_switchfrom(sbbc_softstate_t *);
03831d35f7499c87d51205817c93e9a8d42c4baestevelextern int iosram_switch_tunnel(int);
03831d35f7499c87d51205817c93e9a8d42c4baestevel#endif /* _SYS_SGSBBC_IOSRAM_PRIV_H */