2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A
2N/A/*
2N/A * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#ifndef _FMD_AGENT_H
2N/A#define _FMD_AGENT_H
2N/A
2N/A#include <inttypes.h>
2N/A#include <libnvpair.h>
2N/A#include <umem.h>
2N/A#include <sys/types.h>
2N/A#include <sys/processor.h>
2N/A
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A/*
2N/A * libfmd_agent Interfaces
2N/A *
2N/A * Note: The contents of this file are private to the implementation of the
2N/A * Solaris system and FMD subsystem and are subject to change at any time
2N/A * without notice. Applications and drivers using these interfaces will fail
2N/A * to run on future releases. These interfaces should not be used for any
2N/A * purpose until they are publicly documented for use outside of Sun.
2N/A */
2N/A
2N/A#define FMD_AGENT_VERSION 1
2N/A
2N/A#define FMD_AGENT_RETIRE_DONE 0 /* synchronous success */
2N/A#define FMD_AGENT_RETIRE_ASYNC 1 /* asynchronous complete */
2N/A#define FMD_AGENT_RETIRE_FAIL 2 /* failure */
2N/A
2N/Atypedef struct fmd_agent_hdl fmd_agent_hdl_t;
2N/A
2N/Aextern fmd_agent_hdl_t *fmd_agent_open(int);
2N/Aextern void fmd_agent_close(fmd_agent_hdl_t *);
2N/Aextern int fmd_agent_errno(fmd_agent_hdl_t *);
2N/Aextern const char *fmd_agent_errmsg(fmd_agent_hdl_t *);
2N/Aextern const char *fmd_agent_strerr(int);
2N/A
2N/Aextern int fmd_agent_page_retire(fmd_agent_hdl_t *, nvlist_t *);
2N/Aextern int fmd_agent_page_unretire(fmd_agent_hdl_t *, nvlist_t *);
2N/Aextern int fmd_agent_page_isretired(fmd_agent_hdl_t *, nvlist_t *);
2N/A
2N/A#ifdef __x86
2N/Aextern int fmd_agent_physcpu_info(fmd_agent_hdl_t *, nvlist_t ***cpusp,
2N/A uint_t *ncpu);
2N/Aextern int fmd_agent_cpu_retire(fmd_agent_hdl_t *, int, int, int);
2N/Aextern int fmd_agent_cpu_unretire(fmd_agent_hdl_t *, int, int, int);
2N/Aextern int fmd_agent_cpu_isretired(fmd_agent_hdl_t *, int, int, int);
2N/A#endif /* __x86 */
2N/A
2N/A#ifdef __sparc
2N/Aextern int fmd_agent_cache_retire(fmd_agent_hdl_t *, uint32_t, nvlist_t *);
2N/Aextern int fmd_agent_cache_unretire(fmd_agent_hdl_t *, uint32_t,
2N/A nvlist_t *);
2N/Aextern int fmd_agent_cache_isretired(fmd_agent_hdl_t *, uint32_t,
2N/A nvlist_t *);
2N/A#endif /* __sparc */
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _FMD_AGENT_H */