[OpenBIOS] [commit] r732 - in trunk/openbios-devel: forth/system libopenbios
repository service
svn at openbios.org
Sat Apr 3 10:25:47 CEST 2010
Author: mcayland
Date: Sat Apr 3 10:25:47 2010
New Revision: 732
URL: http://tracker.coreboot.org/trac/openbios/changeset/732
Log:
Fix two errors related to argument passing in the client interface:
i) client-call-iface did not set a return value of 0 on success; hence the top stack argument was dropped as part of the status
check causing an off-by-one error.
ii) instead of setting pb->nret to be the number of arguments returned, the (random) value being passed in was being used to
control the number of arguments being returned.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at siriusit.co.uk>
Modified:
trunk/openbios-devel/forth/system/ciface.fs
trunk/openbios-devel/libopenbios/client.c
Modified: trunk/openbios-devel/forth/system/ciface.fs
==============================================================================
--- trunk/openbios-devel/forth/system/ciface.fs Fri Apr 2 16:25:37 2010 (r731)
+++ trunk/openbios-devel/forth/system/ciface.fs Sat Apr 3 10:25:47 2010 (r732)
@@ -341,4 +341,5 @@
: client-call-iface ( [args] name len -- [args] -1 | [rets] 0 )
ciface-ph find-method 0= if -1 exit then
execute
+ 0
;
Modified: trunk/openbios-devel/libopenbios/client.c
==============================================================================
--- trunk/openbios-devel/libopenbios/client.c Fri Apr 2 16:25:37 2010 (r731)
+++ trunk/openbios-devel/libopenbios/client.c Sat Apr 3 10:25:47 2010 (r732)
@@ -302,11 +302,11 @@
return -1;
}
- for( i=0; i<pb->nret && dstackcnt > dstacksave ; i++ )
- pb->args[pb->nargs + i] = POP();
+ for( pb->nret=0; dstackcnt > dstacksave ; pb->nret++ )
+ pb->args[pb->nargs + pb->nret] = POP();
#ifdef DEBUG_CIF
- if( i != pb->nret || dstackcnt != dstacksave ) {
+ if( dstackcnt != dstacksave ) {
printk("service %s: argument count error (%d %d)\n",
pb->service, i, dstackcnt - dstacksave );
dstackcnt = dstacksave;
More information about the OpenBIOS
mailing list