promif_io.c revision 1ae0874509b6811fdde1dfd46f0d93fd09867a3f
/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/promif_impl.h>
#include <sys/hypervisor_api.h>
#ifndef _KMDB
#endif
/* cached copies of IO params */
int
promif_instance_to_package(void *p)
{
return (0);
}
int
promif_write(void *p)
{
char *buf;
/* only support stdout (console) */
/* try forever */;
}
/* return the length written */
return (0);
}
int
promif_read(void *p)
{
char *buf;
/* unpack arguments */
/* only support stdin (console) */
break;
}
/* return the length read */
return (0);
}
static pnode_t
{
/* only support stdin and stdout */
return (pstdin);
return (pstdout);
return (OBP_BADNODE);
}
#ifdef _KMDB
void
{
}
#else
void
promif_io_init(void)
{
/*
* Cache the mapping between the stdin and stdout
* ihandles and their respective phandles.
*/
pstdin = prom_stdin_node();
pstdout = prom_stdout_node();
istdin = prom_stdin_ihandle();
}
int
promif_instance_to_path(void *p)
{
char *buf;
int rlen;
char *regval;
char name[OBP_MAXPROPNAME];
char scratch[OBP_MAXPATHLEN];
int rvlen;
*buf = '\0';
while (node != prom_rootnode()) {
prom_printf("instance_to_path: no name property "
"node=0x%x\n", node);
return (-1);
}
/* construct the unit address from the 'reg' property */
return (-1);
}
return (0);
}
#endif /* _KMDB */