Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc Add support for /dev/openfirm.
details: https://anonhg.NetBSD.org/src/rev/2b9091674dac
branches: trunk
changeset: 499228:2b9091674dac
user: matt <matt%NetBSD.org@localhost>
date: Tue Nov 14 21:22:43 2000 +0000
description:
Add support for /dev/openfirm.
Add OF_nextprop support.
diffstat:
sys/arch/powerpc/conf/files.ofw | 4 +++-
sys/arch/powerpc/powerpc/openfirm.c | 32 +++++++++++++++++++++++++++++++-
2 files changed, 34 insertions(+), 2 deletions(-)
diffs (61 lines):
diff -r f1dbda542a31 -r 2b9091674dac sys/arch/powerpc/conf/files.ofw
--- a/sys/arch/powerpc/conf/files.ofw Tue Nov 14 21:21:31 2000 +0000
+++ b/sys/arch/powerpc/conf/files.ofw Tue Nov 14 21:22:43 2000 +0000
@@ -1,8 +1,10 @@
-# $NetBSD: files.ofw,v 1.3 1999/02/15 04:29:33 hubertf Exp $
+# $NetBSD: files.ofw,v 1.4 2000/11/14 21:22:43 matt Exp $
file arch/powerpc/powerpc/ofw_machdep.c
file arch/powerpc/powerpc/ofwmagic.S
file arch/powerpc/powerpc/openfirm.c
+defpseudo openfirm
+file dev/ofw/openfirmio.c openfirm needs-flag
# Firmworks OpenFirmware Bug Workarounds
file arch/powerpc/powerpc/ofwreal.S firmworksbugs
diff -r f1dbda542a31 -r 2b9091674dac sys/arch/powerpc/powerpc/openfirm.c
--- a/sys/arch/powerpc/powerpc/openfirm.c Tue Nov 14 21:21:31 2000 +0000
+++ b/sys/arch/powerpc/powerpc/openfirm.c Tue Nov 14 21:22:43 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: openfirm.c,v 1.4 1999/01/10 10:24:16 tsubai Exp $ */
+/* $NetBSD: openfirm.c,v 1.5 2000/11/14 21:22:44 matt Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -199,6 +199,36 @@
}
int
+OF_nextprop(handle, prop, nextprop)
+ int handle;
+ char *prop;
+ char *nextprop;
+{
+ static struct {
+ char *name;
+ int nargs;
+ int nreturns;
+ int phandle;
+ char *prop;
+ char *buf;
+ int flag;
+ } args = {
+ "nextprop",
+ 3,
+ 1,
+ };
+
+ ofw_stack();
+ args.phandle = handle;
+ args.prop = prop;
+ args.buf = OF_buf;
+ if (openfirmware(&args) == -1)
+ return -1;
+ strncpy(nextprop, OF_buf, 32);
+ return args.flag;
+}
+
+int
OF_finddevice(name)
char *name;
{
Home |
Main Index |
Thread Index |
Old Index