cmd_Lxcache.h revision d69c2551e89e9440043ac6ff5739b58746286f33
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _CMD_LxCACHE_H
#define _CMD_LxCACHE_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Routines for the creation of Lxcache retirement faults and for the
* management of Lxcache-related state.
*/
#include <cmd_state.h>
#include <cmd_cpu.h>
#include <cmd_fmri.h>
#ifdef __cplusplus
extern "C" {
#endif
#define QTCLR 1
#define CMD_ANON_WAY -1
#define MAX_WAYS 8
#define CMD_LxCACHE_F_FAULTING 1
#define CMD_LxCACHE_F_RETIRED 0x2
#define CMD_LxCACHE_F_UNRETIRED 0x4
#define CMD_LxCACHE_F_RERETIRED 0x8
#define MAX_FMRI_LEN 128
typedef struct cmd_Lxcache_pers {
/*
* We need the cpu_hdr_bufname in order to restore the Lxcache.
*/
#define CMD_LXFUNCTIONING 0 /* Initial value */
#define CMD_LXSUSPICOUS 1
#define CMD_LXCONVICTED 2
typedef struct cmd_Lxcache {
/*
* Lxcache retirement
*
* When a Lxcache is to be retired, these routines are called to generate and
* manage a fault.memory.Lxcache against the Lxcache.
*/
#ifdef sun4u
cmd_cpu_t *, cmd_errcl_t);
#endif
const char *, cmd_cpu_t *, cmd_ptrsubtype_t, const char *,
const char *, const char *, const char *);
extern void cmd_Lxcache_close(fmd_hdl_t *, void *);
extern cmd_Lxcache_t *
extern void cmd_Lxcache_gc(fmd_hdl_t *);
uint32_t);
const char *);
extern char *cmd_type_to_str(cmd_ptrsubtype_t);
cmd_Lxcache_t *, const char *);
extern int test_mode;
#ifdef __cplusplus
}
#endif
#endif /* _CMD_LxCACHE_H */