From bd7e69e4c5c231c9388dd16605364daf51cc3c0a Mon Sep 17 00:00:00 2001 From: Marius Strobl Date: Fri, 2 Apr 2010 21:48:27 +0000 Subject: With r205496 in place we should ensure that nargs and nreturns are always set to sane values as they no longer default to 0, otherwise some OFW implementation might copy in or out arguments not based on what the actual function takes but what ever stack garbage nargs and nreturns supply. Reviewed by: nwhitehorn --- sys/dev/ofw/ofw_standard.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sys/dev/ofw') diff --git a/sys/dev/ofw/ofw_standard.c b/sys/dev/ofw/ofw_standard.c index 0fda7db8467c..e521fa059d34 100644 --- a/sys/dev/ofw/ofw_standard.c +++ b/sys/dev/ofw/ofw_standard.c @@ -589,6 +589,7 @@ ofw_std_close(ofw_t ofw, ihandle_t instance) } args = { (cell_t)"close", 1, + 0, }; args.instance = instance; @@ -717,6 +718,7 @@ ofw_std_release(ofw_t ofw, void *virt, size_t size) } args = { (cell_t)"release", 2, + 0, }; args.virt = (cell_t)virt; @@ -738,6 +740,8 @@ ofw_std_enter(ofw_t ofw) cell_t nreturns; } args = { (cell_t)"enter", + 0, + 0, }; openfirmware(&args); @@ -754,6 +758,8 @@ ofw_std_exit(ofw_t ofw) cell_t nreturns; } args = { (cell_t)"exit", + 0, + 0, }; openfirmware(&args); -- cgit v1.3