j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: laurent Date: 2009-11-12 02:11:04 +0100 (Thu, 12 Nov 2009) New Revision: 609
Modified: trunk/openbios-devel/forth/system/ciface.fs trunk/openbios-devel/modules/client.c Log: Implement Client Interface method "test-method" defined in "PowerPC Microprocessor CHRP binding", Chapter 10.5.2.
Signed-off-by: Laurent Vivier Laurent@vivier.eu
Modified: trunk/openbios-devel/forth/system/ciface.fs =================================================================== --- trunk/openbios-devel/forth/system/ciface.fs 2009-11-12 00:57:32 UTC (rev 608) +++ trunk/openbios-devel/forth/system/ciface.fs 2009-11-12 01:11:04 UTC (rev 609) @@ -303,6 +303,18 @@ outer-interpreter ;
+[IFDEF] CONFIG_PPC +\ PowerPC Microprocessor CHRP binding +\ 10.5.2. Client Interface + +( phandle cstring-method -- missing ) + +: test-method + dup cstrlen rot + find-method 0= if -1 else drop 0 then +; +[THEN] + finish-device device-end
Modified: trunk/openbios-devel/modules/client.c =================================================================== --- trunk/openbios-devel/modules/client.c 2009-11-12 00:57:32 UTC (rev 608) +++ trunk/openbios-devel/modules/client.c 2009-11-12 01:11:04 UTC (rev 609) @@ -19,7 +19,7 @@ #include "openbios/of.h"
/* Uncomment to enable debug printout of client interface calls */ -//#define DEBUG_CIF +#define DEBUG_CIF //#define DUMP_IO
/* OF client interface. r3 points to the argument array. On return, @@ -143,6 +143,9 @@ printk("enter()\n"); } else if (strcmp(pb->service, "exit") == 0) { printk("exit()\n"); + } else if (strcmp(pb->service, "test-method") == 0) { + printk("test-method(0x%08lx, "%s") = ", + pb->args[0], (char*)pb->args[1]); } else { printk("of_client_interface: %s ", pb->service ); for( i = 0; i < pb->nargs; i++ ) @@ -212,6 +215,8 @@ /* do nothing */ } else if (strcmp(pb->service, "exit") == 0) { /* do nothing */ + } else if (strcmp(pb->service, "test-method") == 0) { + printk("0x%08lx\n", pb->args[pb->nargs]); } else { printk("of_client_interface return:"); for (i = 0; i < pb->nret; i++) {