Deleted Added
full compact
ofw_real.c (208172) ofw_real.c (208614)
1/* $NetBSD: Locore.c,v 1.7 2000/08/20 07:04:59 tsubai Exp $ */
2
3/*-
4 * Copyright (C) 1995, 1996 Wolfgang Solfrank.
5 * Copyright (C) 1995, 1996 TooLs GmbH.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 42 unchanged lines hidden (view full) ---

51 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
52 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
53 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
54 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
55 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
56 */
57
58#include <sys/cdefs.h>
1/* $NetBSD: Locore.c,v 1.7 2000/08/20 07:04:59 tsubai Exp $ */
2
3/*-
4 * Copyright (C) 1995, 1996 Wolfgang Solfrank.
5 * Copyright (C) 1995, 1996 TooLs GmbH.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 42 unchanged lines hidden (view full) ---

51 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
52 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
53 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
54 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
55 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
56 */
57
58#include <sys/cdefs.h>
59__FBSDID("$FreeBSD: head/sys/powerpc/ofw/ofw_real.c 208172 2010-05-16 22:01:43Z nwhitehorn $");
59__FBSDID("$FreeBSD: head/sys/powerpc/ofw/ofw_real.c 208614 2010-05-28 10:43:56Z raj $");
60
61#include <sys/param.h>
62#include <sys/kernel.h>
63#include <sys/lock.h>
64#include <sys/mutex.h>
65#include <sys/systm.h>
66
67#include <vm/vm.h>
68#include <vm/pmap.h>
69
70#include <machine/stdarg.h>
71#include <machine/bus.h>
72#include <machine/pmap.h>
73#include <machine/ofw_machdep.h>
74
75#include <dev/ofw/openfirm.h>
76#include <dev/ofw/ofwvar.h>
77#include "ofw_if.h"
78
60
61#include <sys/param.h>
62#include <sys/kernel.h>
63#include <sys/lock.h>
64#include <sys/mutex.h>
65#include <sys/systm.h>
66
67#include <vm/vm.h>
68#include <vm/pmap.h>
69
70#include <machine/stdarg.h>
71#include <machine/bus.h>
72#include <machine/pmap.h>
73#include <machine/ofw_machdep.h>
74
75#include <dev/ofw/openfirm.h>
76#include <dev/ofw/ofwvar.h>
77#include "ofw_if.h"
78
79static void ofw_real_init(ofw_t, void *openfirm);
79static int ofw_real_init(ofw_t, void *openfirm);
80static int ofw_real_test(ofw_t, const char *name);
81static phandle_t ofw_real_peer(ofw_t, phandle_t node);
82static phandle_t ofw_real_child(ofw_t, phandle_t node);
83static phandle_t ofw_real_parent(ofw_t, phandle_t node);
84static phandle_t ofw_real_instance_to_package(ofw_t, ihandle_t instance);
85static ssize_t ofw_real_getproplen(ofw_t, phandle_t package,
86 const char *propname);
87static ssize_t ofw_real_getprop(ofw_t, phandle_t package, const char *propname,

--- 163 unchanged lines hidden (view full) ---

251 if (of_bounce_virt == NULL)
252 return;
253
254 memcpy(buf,of_bounce_virt + (physaddr - of_bounce_phys),len);
255}
256
257/* Initialiser */
258
80static int ofw_real_test(ofw_t, const char *name);
81static phandle_t ofw_real_peer(ofw_t, phandle_t node);
82static phandle_t ofw_real_child(ofw_t, phandle_t node);
83static phandle_t ofw_real_parent(ofw_t, phandle_t node);
84static phandle_t ofw_real_instance_to_package(ofw_t, ihandle_t instance);
85static ssize_t ofw_real_getproplen(ofw_t, phandle_t package,
86 const char *propname);
87static ssize_t ofw_real_getprop(ofw_t, phandle_t package, const char *propname,

--- 163 unchanged lines hidden (view full) ---

251 if (of_bounce_virt == NULL)
252 return;
253
254 memcpy(buf,of_bounce_virt + (physaddr - of_bounce_phys),len);
255}
256
257/* Initialiser */
258
259static void
259static int
260ofw_real_init(ofw_t ofw, void *openfirm)
261{
262 openfirmware = (int (*)(void *))openfirm;
263
264 mtx_init(&of_bounce_mtx, "OF Bounce Page", MTX_DEF, 0);
265 of_bounce_virt = NULL;
260ofw_real_init(ofw_t ofw, void *openfirm)
261{
262 openfirmware = (int (*)(void *))openfirm;
263
264 mtx_init(&of_bounce_mtx, "OF Bounce Page", MTX_DEF, 0);
265 of_bounce_virt = NULL;
266 return (0);
266}
267
268/*
269 * Generic functions
270 */
271
272/* Test to see if a service exists. */
273static int

--- 655 unchanged lines hidden ---
267}
268
269/*
270 * Generic functions
271 */
272
273/* Test to see if a service exists. */
274static int

--- 655 unchanged lines hidden ---