summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/ofw
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2010-04-02 21:48:27 +0000
committermarius <marius@FreeBSD.org>2010-04-02 21:48:27 +0000
commitbb4566312b32efc10475f0ef7b34bf3427a25225 (patch)
tree330959e841700c3efd9f0bc439057c9ec69815bf /sys/powerpc/ofw
parent4de64106dd619c2617ea88c63727d195031d7479 (diff)
downloadFreeBSD-src-bb4566312b32efc10475f0ef7b34bf3427a25225.zip
FreeBSD-src-bb4566312b32efc10475f0ef7b34bf3427a25225.tar.gz
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
Diffstat (limited to 'sys/powerpc/ofw')
-rw-r--r--sys/powerpc/ofw/ofw_real.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/powerpc/ofw/ofw_real.c b/sys/powerpc/ofw/ofw_real.c
index 094025c..4425ad1 100644
--- a/sys/powerpc/ofw/ofw_real.c
+++ b/sys/powerpc/ofw/ofw_real.c
@@ -737,6 +737,7 @@ ofw_real_close(ofw_t ofw, ihandle_t instance)
} args = {
(cell_t)"close",
1,
+ 0,
};
args.instance = instance;
@@ -876,6 +877,7 @@ ofw_real_release(ofw_t ofw, void *virt, size_t size)
} args = {
(cell_t)"release",
2,
+ 0,
};
args.virt = (cell_t)virt;
@@ -897,6 +899,8 @@ ofw_real_enter(ofw_t ofw)
cell_t nreturns;
} args = {
(cell_t)"enter",
+ 0,
+ 0,
};
openfirmware(&args);
@@ -913,6 +917,8 @@ ofw_real_exit(ofw_t ofw)
cell_t nreturns;
} args = {
(cell_t)"exit",
+ 0,
+ 0,
};
openfirmware(&args);
OpenPOWER on IntegriCloud