/*
* 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 _SYS_PROMIF_IMPL_H
#define _SYS_PROMIF_IMPL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _KERNEL
#include <sys/promimpl.h>
#endif
/*
* CIF handler functions
*/
typedef int (*cif_func_t) (void *);
extern int promif_getprop(void *p);
extern int promif_getproplen(void *p);
extern int promif_nextprop(void *p);
extern int promif_nextnode(void *p);
extern int promif_childnode(void *p);
extern int promif_parentnode(void *p);
extern int promif_enter_mon(void *p);
extern int promif_exit_to_mon(void *p);
extern int promif_reboot(void *p);
extern int promif_write(void *p);
extern int promif_read(void *p);
extern int promif_interpret(void *p);
extern int promif_finddevice(void *p);
extern int promif_instance_to_package(void *p);
#ifndef _KMDB
extern int promif_setprop(void *p);
extern int promif_test(void *p);
extern int promif_instance_to_path(void *p);
extern int promif_power_off(void *p);
extern int promif_asr_list_keys_len(void *p);
extern int promif_asr_list_keys(void *p);
extern int promif_asr_export_len(void *p);
extern int promif_asr_export(void *p);
extern int promif_set_security_key(void *p);
extern int promif_get_security_key(void *p);
extern int promif_start_cpu(void *p);
extern int promif_set_mmfsa_traptable(void *p);
extern int promif_set_sun4v_api_version(void *p);
extern int promif_get_sun4v_api_version(void *p);
#endif
/*
* Shadow device tree access functions
*/
/*
* Hooks for kmdb to get and set a pointer to the PROM shadow tree
*/
#ifdef _KMDB
extern void promif_stree_setroot(void *root);
extern caddr_t promif_stree_getroot(void);
#endif
/*
* Miscellaneous functions
*/
extern char promif_getchar(void);
/*
* Initialization functions
*/
#ifdef _KMDB
#else
extern void promif_io_init(void);
extern void promif_stree_init(void);
extern void promif_prop_init(void);
#endif
/*
* Debugging support
*/
#ifdef DEBUG
#else /* DEBUG */
#endif /* DEBUG */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_PROMIF_IMPL_H */