wrsm_lc.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 (c) 2001 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _SYS_WRSM_LC_H
#define _SYS_WRSM_LC_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/wci_cmmu.h>
#include <sys/wrsm_driver.h>
#include <sys/wrsm_config.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* function return values
*/
#define WRSM_LC_SUCCESS 0
#define WRSM_LC_NOPAROLI 1
#define WRSM_LC_INVALIDARG 2
typedef enum {
CMMU_TYPE_CACHEABLE = 0,
CMMU_TYPE_STICK = 1,
CMMU_TYPE_INTERRUPT = 2,
CMMU_TYPE_ATOMIC = 3
/* Declaration of abstract CMMU entry */
typedef struct {
union {
struct wci_sram_array_as_cmmu_1_int intr;
struct wci_sram_array_as_cmmu_1_addr addr;
} entry_1;
} wrsm_cmmu_t;
#define WRSM_GNID_IS_WCX(w) (w >= WRSM_MAX_WNODES)
/* cmmu_update flags */
#define CMMU_UPDATE_MONDO 0x00001
#define CMMU_UPDATE_FROMNODE 0x00002
#define CMMU_UPDATE_TYPE 0x00004
#define CMMU_UPDATE_VALID 0x00008
#define CMMU_UPDATE_FROMALL 0x00010
#define CMMU_UPDATE_WRITABLE 0x00020
#define CMMU_UPDATE_USERERROR 0x00040
#define CMMU_UPDATE_LARGEPAGE 0x00080
#define CMMU_UPDATE_ENABLEPERF 0x00100
#define CMMU_UPDATE_LPA 0x00200
#define CMMU_UPDATE_INTRDEST 0x00400
#define CMMU_UPDATE_FLUSH 0x08000
#define CMMU_UPDATE_ALL 0x0FFFF
#define CMMU_UPDATE_WRITEONLY 0x10000
#define CMMU_UPDATE_WRITE_0 0x20000
#define CMMU_UPDATE_WRITE_1 0x40000
typedef uint32_t wrsm_cmmu_flags_t;
void wrsm_lc_setup_timeout_speeds(void);
/* for DDI_SUSPEND, DDI_RESUME */
/* the following are supplied for the mh to modify the map registers */
/* The following is for the interrupt trap handler only */
/* the following is for standalone use, when system controller can't be used */
/* the following handles ioctl requests to modify wci registers */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_WRSM_LC_H */