/*
* 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.
*/
#ifndef _SYS_OPL_MODULE_H
#define _SYS_OPL_MODULE_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _KERNEL
/*
* Sets trap table entry ttentry by overwriting eight instructions from ttlabel.
*/
/*
* The same thing as above, but to patch 7 instructions.
*/
/*
* Define for max size of "reason" string in panic flows. Since this is on
* the stack, we want to keep it as small as is reasonable.
*/
/*
* These error types are specific to Olympus and are used internally for the
* opl fault structure flt_type field.
*/
#ifndef _ASM
/*
* Define Olympus family (SPARC64-VI) specific asynchronous error structure
*/
typedef struct olympus_async_flt {
/*
* Error type table struct.
*/
typedef struct ecc_type_to_info {
/*
* Redefine fault status bit field definitions taken from
* "async.h". Reused reserved Ultrasparc3 specific fault status
* bits here since they are by definition mutually exclusive
* w.r.t. OPL
*/
/*
* Since all the files share a bunch of routines between each other
* we will put all the "extern" definitions in this header file so that we
* don't have to repeat it all in every file.
*/
/*
* functions that are defined in the OPL,SPARC64-VI cpu module:
*/
extern void shipit(int, int);
extern void cpu_init_trap(void);
extern void cpu_error_ecache_flush(void);
extern void opl_error_setup(uint64_t);
extern void ras_cntr_reset(void *);
/*
* variables and structures that are defined outside the FJSV,SPARC64-VI
* cpu module:
*/
extern uint64_t xc_tick_limit;
extern uint64_t xc_tick_jump_limit;
/*
* Labels used for the trap_table patching
*/
extern uint32_t tt0_flushw;
extern uint32_t opl_cleanw_patch;
extern void opl_serr_instr(void);
extern void opl_ugerr_instr(void);
extern void opl_ta3_instr(void);
extern void opl_ta4_instr(void);
/*
* D$ and I$ global parameters.
*/
extern int dcache_size;
extern int dcache_linesize;
extern int icache_size;
extern int icache_linesize;
#endif /* _ASM */
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_OPL_MODULE_H */