ldmsvcs_utils.h revision 25351652d920ae27c5a56c199da581033ce763f6
31e37bb439502e3f7c4c0a9a77d655ea5d56887avn * CDDL HEADER START
31e37bb439502e3f7c4c0a9a77d655ea5d56887avn * The contents of this file are subject to the terms of the
31e37bb439502e3f7c4c0a9a77d655ea5d56887avn * Common Development and Distribution License (the "License").
31e37bb439502e3f7c4c0a9a77d655ea5d56887avn * You may not use this file except in compliance with the License.
31e37bb439502e3f7c4c0a9a77d655ea5d56887avn * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31e37bb439502e3f7c4c0a9a77d655ea5d56887avn * See the License for the specific language governing permissions
31e37bb439502e3f7c4c0a9a77d655ea5d56887avn * and limitations under the License.
31e37bb439502e3f7c4c0a9a77d655ea5d56887avn * When distributing Covered Code, include this CDDL HEADER in each
31e37bb439502e3f7c4c0a9a77d655ea5d56887avn * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31e37bb439502e3f7c4c0a9a77d655ea5d56887avn * If applicable, add the following below this CDDL HEADER, with the
31e37bb439502e3f7c4c0a9a77d655ea5d56887avn * fields enclosed by brackets "[]" replaced with your own identifying
31e37bb439502e3f7c4c0a9a77d655ea5d56887avn * information: Portions Copyright [yyyy] [name of copyright owner]
31e37bb439502e3f7c4c0a9a77d655ea5d56887avn * CDDL HEADER END
5f149bca52352f45598e5563debe72ce04bd7a21cy * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
31e37bb439502e3f7c4c0a9a77d655ea5d56887avn * Use is subject to license terms.
31e37bb439502e3f7c4c0a9a77d655ea5d56887avnextern "C" {
31e37bb439502e3f7c4c0a9a77d655ea5d56887avn * Service Information
31e37bb439502e3f7c4c0a9a77d655ea5d56887avntypedef struct fds_svc {
31e37bb439502e3f7c4c0a9a77d655ea5d56887avn * table of registered services
31e37bb439502e3f7c4c0a9a77d655ea5d56887avntypedef struct fds_reg_svcs {
31e37bb439502e3f7c4c0a9a77d655ea5d56887avntypedef enum {
31e37bb439502e3f7c4c0a9a77d655ea5d56887avntypedef struct fds_channel {
31e37bb439502e3f7c4c0a9a77d655ea5d56887avn * FMA services
31e37bb439502e3f7c4c0a9a77d655ea5d56887avntypedef struct {
31e37bb439502e3f7c4c0a9a77d655ea5d56887avn * definition of fma_pri_resp_t is not shown here. for more details,
31e37bb439502e3f7c4c0a9a77d655ea5d56887avn * see ldmsvcs_utils.c:ldmsvcs_get_core_md().
31e37bb439502e3f7c4c0a9a77d655ea5d56887avntypedef struct {
31e37bb439502e3f7c4c0a9a77d655ea5d56887avntypedef struct {
31e37bb439502e3f7c4c0a9a77d655ea5d56887avntypedef struct {
31e37bb439502e3f7c4c0a9a77d655ea5d56887avntypedef struct {
25351652d920ae27c5a56c199da581033ce763f6Vuong Nguyentypedef struct {
25351652d920ae27c5a56c199da581033ce763f6Vuong Nguyentypedef struct {
c3b50bc594edb4e967f0156a09c6e64b845dd8earb * in the default case of ldmd (the LDOM manager daemon/service)
c3b50bc594edb4e967f0156a09c6e64b845dd8earb * not installed/running, set short timeouts for contacting ldmd,
c3b50bc594edb4e967f0156a09c6e64b845dd8earb * so that higher levels in the software stack (ex: diagnosis engines)
c3b50bc594edb4e967f0156a09c6e64b845dd8earb * are not excessively delayed by ldmd's absence. both timeouts are tunable
c3b50bc594edb4e967f0156a09c6e64b845dd8earb * via SMF properties in ldmd's service manifest, and expected to be set
c3b50bc594edb4e967f0156a09c6e64b845dd8earb * thusly to appropriate values when ldmd is installed.
c3b50bc594edb4e967f0156a09c6e64b845dd8earb * timeouts are in seconds. init is the initial timeout; running is
c3b50bc594edb4e967f0156a09c6e64b845dd8earb * for subsequent timeouts.
c3b50bc594edb4e967f0156a09c6e64b845dd8earb#define LDM_RUNNING_TO_PROP_NM "fmd_to_ldmd_running_timeout"
31e37bb439502e3f7c4c0a9a77d655ea5d56887avnextern int ldmsvcs_check_channel(void);
31e37bb439502e3f7c4c0a9a77d655ea5d56887avnextern ssize_t ldmsvcs_get_core_md(struct ldom_hdl *lhp, uint64_t **buf);
31e37bb439502e3f7c4c0a9a77d655ea5d56887avnextern int ldmsvcs_cpu_req_status(struct ldom_hdl *lhp, uint32_t cpuid);
31e37bb439502e3f7c4c0a9a77d655ea5d56887avnextern int ldmsvcs_mem_req_status(struct ldom_hdl *lhp, uint64_t pa);
31e37bb439502e3f7c4c0a9a77d655ea5d56887avnextern int ldmsvcs_cpu_req_offline(struct ldom_hdl *lhp, uint32_t cpuid);
31e37bb439502e3f7c4c0a9a77d655ea5d56887avnextern int ldmsvcs_mem_req_retire(struct ldom_hdl *lhp, uint64_t pa);
5f149bca52352f45598e5563debe72ce04bd7a21cyextern int ldmsvcs_cpu_req_online(struct ldom_hdl *lhp, uint32_t cpuid);
5f149bca52352f45598e5563debe72ce04bd7a21cyextern int ldmsvcs_mem_req_unretire(struct ldom_hdl *lhp, uint64_t pa);
25351652d920ae27c5a56c199da581033ce763f6Vuong Nguyenextern int ldmsvcs_io_req_id(struct ldom_hdl *lhp, uint64_t addr, uint_t type,
25351652d920ae27c5a56c199da581033ce763f6Vuong Nguyen uint64_t *virt_addr, char *name, int name_len, uint64_t *did);
31e37bb439502e3f7c4c0a9a77d655ea5d56887avn#endif /* _LDMSVCS_UTILS_H */