-/* $OpenBSD: ofw_machdep.c,v 1.35 2022/10/16 01:22:39 jsg Exp $ */
+/* $OpenBSD: ofw_machdep.c,v 1.36 2022/10/17 18:49:06 kettenis Exp $ */
/* $NetBSD: ofw_machdep.c,v 1.16 2001/07/20 00:07:14 eeh Exp $ */
/*
cell_t vaddr;
cell_t phys_hi;
cell_t phys_lo;
- cell_t status;
- cell_t retaddr;
} args;
if (mmuh == -1 && ((mmuh = get_mmu_handle()) == -1)) {
}
args.name = ADR2CELL("call-method");
args.nargs = 7;
- args.nreturns = 1;
+ args.nreturns = 0;
args.method = ADR2CELL("map");
args.ihandle = HDL2CELL(mmuh);
args.mode = mode;
args.vaddr = ADR2CELL(vaddr);
args.phys_hi = HDQ2CELL_HI(paddr);
args.phys_lo = HDQ2CELL_LO(paddr);
-
- if (openfirmware(&args) == -1)
- return -1;
- if (args.status)
- return -1;
- return (int)args.retaddr;
+ return openfirmware(&args);
}