2000-10-16 10:46:22 +00:00
|
|
|
/* $NetBSD: Locore.c,v 1.7 2000/08/20 07:04:59 tsubai Exp $ */
|
|
|
|
|
2005-01-06 01:43:34 +00:00
|
|
|
/*-
|
2000-10-16 10:46:22 +00:00
|
|
|
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
|
|
|
* Copyright (C) 1995, 1996 TooLs GmbH.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
* 3. All advertising materials mentioning features or use of this software
|
|
|
|
* must display the following acknowledgement:
|
|
|
|
* This product includes software developed by TooLs GmbH.
|
|
|
|
* 4. The name of TooLs GmbH may not be used to endorse or promote products
|
|
|
|
* derived from this software without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
* IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
|
|
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
|
|
|
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
|
|
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
|
|
|
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
|
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
2005-01-06 01:43:34 +00:00
|
|
|
/*-
|
2000-10-16 10:46:22 +00:00
|
|
|
* Copyright (C) 2000 Benno Rice.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY Benno Rice ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
* IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
|
|
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
|
|
|
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
|
|
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
|
|
|
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
|
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
2007-06-16 21:38:04 +00:00
|
|
|
#include <sys/cdefs.h>
|
|
|
|
__FBSDID("$FreeBSD$");
|
|
|
|
|
2001-07-31 03:36:26 +00:00
|
|
|
#include <sys/param.h>
|
2001-11-18 20:38:44 +00:00
|
|
|
#include <sys/kernel.h>
|
|
|
|
#include <sys/malloc.h>
|
2001-06-16 07:17:56 +00:00
|
|
|
#include <sys/systm.h>
|
2000-10-16 10:46:22 +00:00
|
|
|
|
2001-06-16 07:17:56 +00:00
|
|
|
#include <machine/stdarg.h>
|
2000-11-10 06:39:58 +00:00
|
|
|
|
2001-06-16 07:17:56 +00:00
|
|
|
#include <dev/ofw/openfirm.h>
|
2008-12-20 00:33:10 +00:00
|
|
|
#include <dev/ofw/ofwvar.h>
|
|
|
|
|
|
|
|
#include "ofw_if.h"
|
2000-10-16 10:46:22 +00:00
|
|
|
|
2004-08-16 15:45:27 +00:00
|
|
|
MALLOC_DEFINE(M_OFWPROP, "openfirm", "Open Firmware properties");
|
2001-11-18 20:38:44 +00:00
|
|
|
|
2000-10-16 10:46:22 +00:00
|
|
|
static ihandle_t stdout;
|
|
|
|
|
2008-12-20 00:33:10 +00:00
|
|
|
static ofw_def_t *ofw_def_impl;
|
|
|
|
static ofw_t ofw_obj;
|
|
|
|
static struct ofw_kobj ofw_kernel_obj;
|
|
|
|
static struct kobj_ops ofw_kernel_kops;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* OFW install routines. Highest priority wins, equal priority also
|
|
|
|
* overrides allowing last-set to win.
|
|
|
|
*/
|
|
|
|
SET_DECLARE(ofw_set, ofw_def_t);
|
|
|
|
|
|
|
|
boolean_t
|
|
|
|
OF_install(char *name, int prio)
|
|
|
|
{
|
|
|
|
ofw_def_t **ofwpp, *ofwp;
|
|
|
|
static int curr_prio = 0;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Try and locate the OFW kobj corresponding to the name
|
|
|
|
*/
|
|
|
|
SET_FOREACH(ofwpp, ofw_set) {
|
|
|
|
ofwp = *ofwpp;
|
|
|
|
|
|
|
|
if (ofwp->name &&
|
|
|
|
!strcmp(ofwp->name, name) &&
|
|
|
|
prio >= curr_prio) {
|
|
|
|
curr_prio = prio;
|
|
|
|
ofw_def_impl = ofwp;
|
|
|
|
return (TRUE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return (FALSE);
|
|
|
|
}
|
|
|
|
|
2007-06-16 21:38:04 +00:00
|
|
|
/* Initialiser */
|
2000-10-16 10:46:22 +00:00
|
|
|
|
|
|
|
void
|
2008-12-20 00:33:10 +00:00
|
|
|
OF_init(void *cookie)
|
2000-10-16 10:46:22 +00:00
|
|
|
{
|
2007-06-16 21:38:04 +00:00
|
|
|
phandle_t chosen;
|
2001-06-16 07:17:56 +00:00
|
|
|
|
2008-12-20 00:33:10 +00:00
|
|
|
ofw_obj = &ofw_kernel_obj;
|
|
|
|
/*
|
|
|
|
* Take care of compiling the selected class, and
|
|
|
|
* then statically initialize the OFW object
|
|
|
|
*/
|
|
|
|
kobj_class_compile_static(ofw_def_impl, &ofw_kernel_kops);
|
|
|
|
kobj_init((kobj_t)ofw_obj, ofw_def_impl);
|
|
|
|
|
|
|
|
OFW_INIT(ofw_obj, cookie);
|
|
|
|
|
2001-06-16 07:17:56 +00:00
|
|
|
if ((chosen = OF_finddevice("/chosen")) == -1)
|
|
|
|
OF_exit();
|
2007-06-16 22:34:16 +00:00
|
|
|
if (OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)) == -1)
|
2008-12-20 00:33:10 +00:00
|
|
|
stdout = -1;
|
2001-06-16 07:17:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
OF_printf(const char *fmt, ...)
|
|
|
|
{
|
|
|
|
va_list va;
|
2007-06-16 21:38:04 +00:00
|
|
|
char buf[1024];
|
2001-06-16 07:17:56 +00:00
|
|
|
|
|
|
|
va_start(va, fmt);
|
|
|
|
vsprintf(buf, fmt, va);
|
|
|
|
OF_write(stdout, buf, strlen(buf));
|
|
|
|
va_end(va);
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Generic functions
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Test to see if a service exists. */
|
|
|
|
int
|
2008-12-20 00:33:10 +00:00
|
|
|
OF_test(const char *name)
|
2000-10-16 10:46:22 +00:00
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
return (OFW_TEST(ofw_obj, name));
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
2003-06-07 18:34:04 +00:00
|
|
|
int
|
2008-12-20 00:33:10 +00:00
|
|
|
OF_interpret(const char *cmd, int nreturns, ...)
|
2003-06-07 18:34:04 +00:00
|
|
|
{
|
|
|
|
va_list ap;
|
2008-12-20 00:33:10 +00:00
|
|
|
unsigned long slots[16];
|
2003-06-07 18:34:04 +00:00
|
|
|
int i = 0;
|
2008-12-20 00:33:10 +00:00
|
|
|
int status;
|
|
|
|
|
|
|
|
status = OFW_INTERPRET(ofw_obj, cmd, nreturns, slots);
|
2003-06-07 18:34:04 +00:00
|
|
|
|
2007-07-06 00:47:44 +00:00
|
|
|
va_start(ap, nreturns);
|
2003-06-07 18:34:04 +00:00
|
|
|
while (i < 1 + nreturns)
|
2008-12-20 00:33:10 +00:00
|
|
|
*va_arg(ap, cell_t *) = slots[i++];
|
2003-06-07 18:34:04 +00:00
|
|
|
va_end(ap);
|
|
|
|
|
2008-12-20 00:33:10 +00:00
|
|
|
return (status);
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Device tree functions
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Return the next sibling of this node or 0. */
|
|
|
|
phandle_t
|
|
|
|
OF_peer(phandle_t node)
|
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
return (OFW_PEER(ofw_obj, node));
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Return the first child of this node or 0. */
|
|
|
|
phandle_t
|
|
|
|
OF_child(phandle_t node)
|
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
return (OFW_CHILD(ofw_obj, node));
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Return the parent of this node or 0. */
|
|
|
|
phandle_t
|
|
|
|
OF_parent(phandle_t node)
|
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
return (OFW_PARENT(ofw_obj, node));
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Return the package handle that corresponds to an instance handle. */
|
|
|
|
phandle_t
|
|
|
|
OF_instance_to_package(ihandle_t instance)
|
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
return (OFW_INSTANCE_TO_PACKAGE(ofw_obj, instance));
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Get the length of a property of a package. */
|
2008-12-20 00:33:10 +00:00
|
|
|
ssize_t
|
|
|
|
OF_getproplen(phandle_t package, const char *propname)
|
2000-10-16 10:46:22 +00:00
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
return (OFW_GETPROPLEN(ofw_obj, package, propname));
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Get the value of a property of a package. */
|
2008-12-20 00:33:10 +00:00
|
|
|
ssize_t
|
|
|
|
OF_getprop(phandle_t package, const char *propname, void *buf, size_t buflen)
|
2000-10-16 10:46:22 +00:00
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
return (OFW_GETPROP(ofw_obj, package, propname, buf, buflen));
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
2001-11-18 20:38:44 +00:00
|
|
|
/*
|
2004-05-22 16:45:19 +00:00
|
|
|
* Store the value of a property of a package into newly allocated memory
|
|
|
|
* (using the M_OFWPROP malloc pool and M_WAITOK). elsz is the size of a
|
|
|
|
* single element, the number of elements is return in number.
|
2001-11-18 20:38:44 +00:00
|
|
|
*/
|
2008-12-20 00:33:10 +00:00
|
|
|
ssize_t
|
|
|
|
OF_getprop_alloc(phandle_t package, const char *propname, int elsz, void **buf)
|
2001-11-18 20:38:44 +00:00
|
|
|
{
|
|
|
|
int len;
|
|
|
|
|
|
|
|
*buf = NULL;
|
|
|
|
if ((len = OF_getproplen(package, propname)) == -1 ||
|
|
|
|
len % elsz != 0)
|
|
|
|
return (-1);
|
|
|
|
|
2003-02-19 05:47:46 +00:00
|
|
|
*buf = malloc(len, M_OFWPROP, M_WAITOK);
|
2001-11-18 20:38:44 +00:00
|
|
|
if (OF_getprop(package, propname, *buf, len) == -1) {
|
|
|
|
free(*buf, M_OFWPROP);
|
|
|
|
*buf = NULL;
|
|
|
|
return (-1);
|
|
|
|
}
|
|
|
|
return (len / elsz);
|
|
|
|
}
|
|
|
|
|
2000-10-16 10:46:22 +00:00
|
|
|
/* Get the next property of a package. */
|
|
|
|
int
|
2008-12-20 00:33:10 +00:00
|
|
|
OF_nextprop(phandle_t package, const char *previous, char *buf, size_t size)
|
2000-10-16 10:46:22 +00:00
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
return (OFW_NEXTPROP(ofw_obj, package, previous, buf, size));
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Set the value of a property of a package. */
|
|
|
|
int
|
2008-12-20 00:33:10 +00:00
|
|
|
OF_setprop(phandle_t package, const char *propname, const void *buf, size_t len)
|
2000-10-16 10:46:22 +00:00
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
return (OFW_SETPROP(ofw_obj, package, propname, buf,len));
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Convert a device specifier to a fully qualified pathname. */
|
2008-12-20 00:33:10 +00:00
|
|
|
ssize_t
|
|
|
|
OF_canon(const char *device, char *buf, size_t len)
|
2000-10-16 10:46:22 +00:00
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
return (OFW_CANON(ofw_obj, device, buf, len));
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Return a package handle for the specified device. */
|
|
|
|
phandle_t
|
2000-11-10 06:39:58 +00:00
|
|
|
OF_finddevice(const char *device)
|
2000-10-16 10:46:22 +00:00
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
return (OFW_FINDDEVICE(ofw_obj, device));
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Return the fully qualified pathname corresponding to an instance. */
|
2008-12-20 00:33:10 +00:00
|
|
|
ssize_t
|
|
|
|
OF_instance_to_path(ihandle_t instance, char *buf, size_t len)
|
2000-10-16 10:46:22 +00:00
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
return (OFW_INSTANCE_TO_PATH(ofw_obj, instance, buf, len));
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Return the fully qualified pathname corresponding to a package. */
|
2008-12-20 00:33:10 +00:00
|
|
|
ssize_t
|
|
|
|
OF_package_to_path(phandle_t package, char *buf, size_t len)
|
2000-10-16 10:46:22 +00:00
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
return (OFW_PACKAGE_TO_PATH(ofw_obj, package, buf, len));
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Call the method in the scope of a given instance. */
|
|
|
|
int
|
2008-12-20 00:33:10 +00:00
|
|
|
OF_call_method(const char *method, ihandle_t instance, int nargs, int nreturns,
|
|
|
|
...)
|
2000-10-16 10:46:22 +00:00
|
|
|
{
|
|
|
|
va_list ap;
|
2008-12-20 00:33:10 +00:00
|
|
|
unsigned long args_n_results[12];
|
|
|
|
int n, status;
|
2000-10-16 10:46:22 +00:00
|
|
|
|
|
|
|
if (nargs > 6)
|
2007-06-16 21:38:04 +00:00
|
|
|
return (-1);
|
2000-10-16 10:46:22 +00:00
|
|
|
va_start(ap, nreturns);
|
2008-12-20 00:33:10 +00:00
|
|
|
for (n = 0; n < nargs; n++)
|
|
|
|
args_n_results[n] = va_arg(ap, unsigned long);
|
|
|
|
|
|
|
|
status = OFW_CALL_METHOD(ofw_obj, instance, method, nargs, nreturns,
|
|
|
|
args_n_results);
|
|
|
|
|
|
|
|
if (status != 0)
|
|
|
|
return (status);
|
|
|
|
|
|
|
|
for (; n < nargs + nreturns; n++)
|
|
|
|
*va_arg(ap, unsigned long *) = args_n_results[n];
|
2000-10-16 10:46:22 +00:00
|
|
|
va_end(ap);
|
2007-06-16 21:38:04 +00:00
|
|
|
return (0);
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2007-06-16 21:38:04 +00:00
|
|
|
* Device I/O functions
|
2000-10-16 10:46:22 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* Open an instance for a device. */
|
|
|
|
ihandle_t
|
2008-12-20 00:33:10 +00:00
|
|
|
OF_open(const char *device)
|
2000-10-16 10:46:22 +00:00
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
return (OFW_OPEN(ofw_obj, device));
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Close an instance. */
|
|
|
|
void
|
|
|
|
OF_close(ihandle_t instance)
|
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
OFW_CLOSE(ofw_obj, instance);
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Read from an instance. */
|
2008-12-20 00:33:10 +00:00
|
|
|
ssize_t
|
|
|
|
OF_read(ihandle_t instance, void *addr, size_t len)
|
2000-10-16 10:46:22 +00:00
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
return (OFW_READ(ofw_obj, instance, addr, len));
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Write to an instance. */
|
2008-12-20 00:33:10 +00:00
|
|
|
ssize_t
|
|
|
|
OF_write(ihandle_t instance, const void *addr, size_t len)
|
2000-10-16 10:46:22 +00:00
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
return (OFW_WRITE(ofw_obj, instance, addr, len));
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Seek to a position. */
|
|
|
|
int
|
2008-12-20 00:33:10 +00:00
|
|
|
OF_seek(ihandle_t instance, uint64_t pos)
|
2000-10-16 10:46:22 +00:00
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
return (OFW_SEEK(ofw_obj, instance, pos));
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2007-06-16 21:38:04 +00:00
|
|
|
* Memory functions
|
2000-10-16 10:46:22 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* Claim an area of memory. */
|
|
|
|
void *
|
2008-12-20 00:33:10 +00:00
|
|
|
OF_claim(void *virt, size_t size, u_int align)
|
2000-10-16 10:46:22 +00:00
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
return (OFW_CLAIM(ofw_obj, virt, size, align));
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Release an area of memory. */
|
|
|
|
void
|
2008-12-20 00:33:10 +00:00
|
|
|
OF_release(void *virt, size_t size)
|
2000-10-16 10:46:22 +00:00
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
OFW_RELEASE(ofw_obj, virt, size);
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2007-06-16 21:38:04 +00:00
|
|
|
* Control transfer functions
|
2000-10-16 10:46:22 +00:00
|
|
|
*/
|
|
|
|
|
2004-08-16 15:45:27 +00:00
|
|
|
/* Suspend and drop back to the Open Firmware interface. */
|
2000-10-16 10:46:22 +00:00
|
|
|
void
|
|
|
|
OF_enter()
|
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
OFW_ENTER(ofw_obj);
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|
2004-08-16 15:45:27 +00:00
|
|
|
/* Shut down and drop back to the Open Firmware interface. */
|
2000-11-10 06:39:58 +00:00
|
|
|
void
|
2000-10-16 10:46:22 +00:00
|
|
|
OF_exit()
|
|
|
|
{
|
2008-12-20 00:33:10 +00:00
|
|
|
/* Should not return */
|
|
|
|
OFW_EXIT(ofw_obj);
|
|
|
|
|
2007-06-16 21:38:04 +00:00
|
|
|
for (;;) /* just in case */
|
|
|
|
;
|
2000-10-16 10:46:22 +00:00
|
|
|
}
|
|
|
|
|