From owner-p4-projects@FreeBSD.ORG Sat Jan 3 17:02:17 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 52CC41065672; Sat, 3 Jan 2009 17:02:17 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11F3D106564A for ; Sat, 3 Jan 2009 17:02:17 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B96398FC12 for ; Sat, 3 Jan 2009 17:02:16 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n03H2G68020695 for ; Sat, 3 Jan 2009 17:02:16 GMT (envelope-from nwhitehorn@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n03H2Gdf020693 for perforce@freebsd.org; Sat, 3 Jan 2009 17:02:16 GMT (envelope-from nwhitehorn@freebsd.org) Date: Sat, 3 Jan 2009 17:02:16 GMT Message-Id: <200901031702.n03H2Gdf020693@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to nwhitehorn@freebsd.org using -f From: Nathan Whitehorn To: Perforce Change Reviews Cc: Subject: PERFORCE change 155592 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 17:02:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=155592 Change 155592 by nwhitehorn@nwhitehorn_trantor on 2009/01/03 17:01:26 Diff reduction against head. Affected files ... .. //depot/projects/ppc-g5/sys/dev/ofw/ofw_if.m#3 edit .. //depot/projects/ppc-g5/sys/dev/ofw/ofw_standard.c#3 edit Differences ... ==== //depot/projects/ppc-g5/sys/dev/ofw/ofw_if.m#3 (text+ko) ==== @@ -23,7 +23,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/sys/powerpc/powerpc/mmu_if.m,v 1.9 2008/05/18 04:16:56 alc Exp $ +# $FreeBSD: src/sys/dev/ofw/ofw_if.m,v 1.1 2008/12/20 00:33:10 nwhitehorn Exp $ # #include @@ -161,7 +161,7 @@ char *_buf; size_t _size; }; - + /** * @brief Return phandle for named device * @@ -187,7 +187,7 @@ }; /** - * @brief Return path for node + * @brief Return path for node * * @param _node Package node * @param _path Buffer for path ==== //depot/projects/ppc-g5/sys/dev/ofw/ofw_standard.c#3 (text+ko) ==== @@ -56,7 +56,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ofw/openfirm.c,v 1.21 2007/07/06 00:47:44 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ofw/ofw_standard.c,v 1.1 2008/12/20 00:33:10 nwhitehorn Exp $"); #include #include @@ -64,46 +64,48 @@ #include #include -#include #include #include #include "ofw_if.h" -static void ofw_std_init(ofw_t, void *openfirm); -static int ofw_std_test(ofw_t, const char *name); -static int ofw_std_interpret(ofw_t, const char *cmd, int nreturns, +static void ofw_std_init(ofw_t ofw, void *openfirm); +static int ofw_std_test(ofw_t ofw, const char *name); +static int ofw_std_interpret(ofw_t ofw, const char *cmd, int nreturns, unsigned long *returns); -static phandle_t ofw_std_peer(ofw_t, phandle_t node); -static phandle_t ofw_std_child(ofw_t, phandle_t node); -static phandle_t ofw_std_parent(ofw_t, phandle_t node); -static phandle_t ofw_std_instance_to_package(ofw_t, ihandle_t instance); -static ssize_t ofw_std_getproplen(ofw_t, phandle_t package, +static phandle_t ofw_std_peer(ofw_t ofw, phandle_t node); +static phandle_t ofw_std_child(ofw_t ofw, phandle_t node); +static phandle_t ofw_std_parent(ofw_t ofw, phandle_t node); +static phandle_t ofw_std_instance_to_package(ofw_t ofw, ihandle_t instance); +static ssize_t ofw_std_getproplen(ofw_t ofw, phandle_t package, const char *propname); -static ssize_t ofw_std_getprop(ofw_t, phandle_t package, const char *propname, - void *buf, size_t buflen); -static int ofw_std_nextprop(ofw_t, phandle_t package, const char *previous, +static ssize_t ofw_std_getprop(ofw_t ofw, phandle_t package, + const char *propname, void *buf, size_t buflen); +static int ofw_std_nextprop(ofw_t ofw, phandle_t package, const char *previous, char *buf, size_t); -static int ofw_std_setprop(ofw_t, phandle_t package, char *propname, +static int ofw_std_setprop(ofw_t ofw, phandle_t package, char *propname, void *buf, size_t len); -static ssize_t ofw_std_canon(ofw_t, const char *device, char *buf, size_t len); -static phandle_t ofw_std_finddevice(ofw_t, const char *device); -static ssize_t ofw_std_instance_to_path(ofw_t, ihandle_t instance, char *buf, +static ssize_t ofw_std_canon(ofw_t ofw, const char *device, char *buf, + size_t len); +static phandle_t ofw_std_finddevice(ofw_t ofw, const char *device); +static ssize_t ofw_std_instance_to_path(ofw_t ofw, ihandle_t instance, + char *buf, size_t len); +static ssize_t ofw_std_package_to_path(ofw_t ofw, phandle_t package, char *buf, size_t len); -static ssize_t ofw_std_package_to_path(ofw_t, phandle_t package, char *buf, +static int ofw_std_call_method(ofw_t ofw, ihandle_t instance, + const char *method, int nargs, int nreturns, + unsigned long *args_and_returns); +static ihandle_t ofw_std_open(ofw_t ofw, const char *device); +static void ofw_std_close(ofw_t ofw, ihandle_t instance); +static ssize_t ofw_std_read(ofw_t ofw, ihandle_t instance, void *addr, size_t len); -static int ofw_std_call_method(ofw_t, ihandle_t instance, const char *method, - int nargs, int nreturns, unsigned long *args_and_returns); -static ihandle_t ofw_std_open(ofw_t, const char *device); -static void ofw_std_close(ofw_t, ihandle_t instance); -static ssize_t ofw_std_read(ofw_t, ihandle_t instance, void *addr, size_t len); -static ssize_t ofw_std_write(ofw_t, ihandle_t instance, const void *addr, +static ssize_t ofw_std_write(ofw_t ofw, ihandle_t instance, const void *addr, size_t len); -static int ofw_std_seek(ofw_t, ihandle_t instance, u_int64_t pos); -static caddr_t ofw_std_claim(ofw_t, void *virt, size_t size, u_int align); -static void ofw_std_release(ofw_t, void *virt, size_t size); -static void ofw_std_enter(ofw_t); -static void ofw_std_exit(ofw_t); +static int ofw_std_seek(ofw_t ofw, ihandle_t instance, u_int64_t pos); +static caddr_t ofw_std_claim(ofw_t ofw, void *virt, size_t size, u_int align); +static void ofw_std_release(ofw_t ofw, void *virt, size_t size); +static void ofw_std_enter(ofw_t ofw); +static void ofw_std_exit(ofw_t ofw); static ofw_method_t ofw_std_methods[] = { OFWMETHOD(ofw_init, ofw_std_init), @@ -180,7 +182,7 @@ } static int -ofw_std_interpret(ofw_t ofw, const char *cmd, int nreturns, +ofw_std_interpret(ofw_t ofw, const char *cmd, int nreturns, unsigned long *returns) { static struct { @@ -324,7 +326,7 @@ /* Get the value of a property of a package. */ static ssize_t -ofw_std_getprop(ofw_t ofw, phandle_t package, const char *propname, void *buf, +ofw_std_getprop(ofw_t ofw, phandle_t package, const char *propname, void *buf, size_t buflen) { static struct { @@ -353,7 +355,7 @@ /* Get the next property of a package. */ static int -ofw_std_nextprop(ofw_t ofw, phandle_t package, const char *previous, char *buf, +ofw_std_nextprop(ofw_t ofw, phandle_t package, const char *previous, char *buf, size_t size) { static struct { @@ -381,7 +383,7 @@ /* Set the value of a property of a package. */ /* XXX Has a bug on FirePower */ static int -ofw_std_setprop(ofw_t ofw, phandle_t package, char *propname, void *buf, +ofw_std_setprop(ofw_t ofw, phandle_t package, char *propname, void *buf, size_t len) { static struct { @@ -510,7 +512,7 @@ /* Call the method in the scope of a given instance. */ static int -ofw_std_call_method(ofw_t ofw, ihandle_t instance, const char *method, +ofw_std_call_method(ofw_t ofw, ihandle_t instance, const char *method, int nargs, int nreturns, unsigned long *args_and_returns) { static struct {