/*
* 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
*/
/*
*/
#include <sys/promimpl.h>
/*
* Returns 0 on error. Otherwise returns a handle.
*/
int
{
#ifdef PROM_32BIT_ADDRS
return (0);
}
#endif
ow = promif_preout();
(void) p1275_cif_handler(&ci);
#ifdef PROM_32BIT_ADDRS
#endif
}
int
{
(void) p1275_cif_handler(&ci);
}
/*ARGSUSED3*/
{
#ifdef PROM_32BIT_ADDRS
return (-1);
}
#endif
ow = promif_preout();
(void) p1275_cif_handler(&ci);
#ifdef PROM_32BIT_ADDRS
}
#endif
}
/*
* prom_write is the only prom_*() function we have to intercept
* because all the other prom_*() io interfaces eventually call
* into prom_write().
*/
/*ARGSUSED3*/
{
#ifdef PROM_32BIT_ADDRS
#endif
/*
* If the callback address is set, attempt to redirect
* console output back into kernel terminal emulator.
*/
ow = promif_preout();
len);
return (rlen);
}
#ifdef PROM_32BIT_ADDRS
/*
* This is a hack for kernel message output.
* By avoiding calls to promplat_alloc (and
* using smallbuf instead) when memory is low
* we can print shortish kernel messages without
* deadlocking. smallbuf should be at least as
* large as the automatic buffer in
* prom_printf.c:_doprint()'s stack frame.
* promplat_alloc() can block on a mutex and so
* is called here before calling promif_preprom().
*/
return (-1);
}
}
}
#endif
/*
* Normally we'd call promif_preprom() just before
* calling into the prom (to enforce single-threaded
* access) but here we need to call it before accessing
* smallbuf, since smallbuf is statically allocated and
* hence can only be accessed by one thread at a time.
*/
ow = promif_preout();
#ifdef PROM_32BIT_ADDRS
/*
* If buf is small enough, use smallbuf
* instead of promplat_alloc() (see above)
* smallbuf is static, so single thread
* access to it by using it only after
* promif_preprom()
*/
}
}
#endif
(void) p1275_cif_handler(&ci);
#ifdef PROM_32BIT_ADDRS
#endif
return (rlen);
}
int
{
ow = promif_preout();
(void) p1275_cif_handler(&ci);
return (0);
}