Fix bug when DEBUG_CIF is enabled and getprop is called with nret set to zero. Originally the code tried to use the size

returned from the CIF, but with nret set to zero then the size argument is never pushed onto the stack and so the size would be 
set to whatever junk was left in the argument block. Change the code to use the size expected by the client instead.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@736 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Mark Cave-Ayland
2010-04-08 21:19:09 +00:00
committed by Mark Cave-Ayland
parent aa6519e1f2
commit e5e7d12503

View File

@@ -171,7 +171,7 @@ static void dump_return(prom_args_t *pb)
printk("0x%08lx\n", pb->args[pb->nargs]); printk("0x%08lx\n", pb->args[pb->nargs]);
} else if (strcmp(pb->service, "getprop") == 0) { } else if (strcmp(pb->service, "getprop") == 0) {
printk("%ld\n", pb->args[pb->nargs]); printk("%ld\n", pb->args[pb->nargs]);
memdump((char*)pb->args[2], pb->args[pb->nargs]); memdump((char*)pb->args[2], pb->args[3]);
} else if (strcmp(pb->service, "nextprop") == 0) { } else if (strcmp(pb->service, "nextprop") == 0) {
printk("%ld\n", pb->args[pb->nargs]); printk("%ld\n", pb->args[pb->nargs]);
memdump((char*)pb->args[2], pb->args[pb->nargs]); memdump((char*)pb->args[2], pb->args[pb->nargs]);