static int ofw_std_call_method(ofw_t ofw, ihandle_t instance, const char *method, int nargs, int nreturns, cell_t *args_and_returns); static ihandle_t ofw_std_open(ofw_t ofw, const char *device); static void ofw_std_close(ofw_t ofw, ihandle_t instance); static ssize_t ofw_std_read(ofw_t ofw, ihandle_t instance, void *addr, size_t len); static ssize_t ofw_std_write(ofw_t ofw, ihandle_t instance, const void *addr, size_t len); static int ofw_std_seek(ofw_t ofw, ihandle_t instance, uint64_t pos); static caddr_t ofw_std_claim(ofw_t ofw, void *virt, size_t size, u_int align); static void ofw_std_release(ofw_t ofw, void *virt, size_t size); static void ofw_std_enter(ofw_t ofw); static void ofw_std_exit(ofw_t ofw); static ofw_method_t ofw_std_methods[] = { OFWMETHOD(ofw_init, ofw_std_init), OFWMETHOD(ofw_peer, ofw_std_peer), OFWMETHOD(ofw_child, ofw_std_child), OFWMETHOD(ofw_parent, ofw_std_parent), OFWMETHOD(ofw_instance_to_package, ofw_std_instance_to_package), OFWMETHOD(ofw_getproplen, ofw_std_getproplen), OFWMETHOD(ofw_getprop, ofw_std_getprop), OFWMETHOD(ofw_nextprop, ofw_std_nextprop), OFWMETHOD(ofw_setprop, ofw_std_setprop), OFWMETHOD(ofw_canon, ofw_std_canon), OFWMETHOD(ofw_finddevice, ofw_std_finddevice), OFWMETHOD(ofw_instance_to_path, ofw_std_instance_to_path), OFWMETHOD(ofw_package_to_path, ofw_std_package_to_path), OFWMETHOD(ofw_test, ofw_std_test), OFWMETHOD(ofw_call_method, ofw_std_call_method),
static phandle_t ofw_fdt_child(ofw_t, phandle_t); static phandle_t ofw_fdt_parent(ofw_t, phandle_t); static phandle_t ofw_fdt_instance_to_package(ofw_t, ihandle_t); static ssize_t ofw_fdt_getproplen(ofw_t, phandle_t, const char *); static ssize_t ofw_fdt_getprop(ofw_t, phandle_t, const char *, void *, size_t); static int ofw_fdt_nextprop(ofw_t, phandle_t, const char *, char *, size_t); static int ofw_fdt_setprop(ofw_t, phandle_t, const char *, const void *, size_t); static ssize_t ofw_fdt_canon(ofw_t, const char *, char *, size_t); static phandle_t ofw_fdt_finddevice(ofw_t, const char *); static ssize_t ofw_fdt_instance_to_path(ofw_t, ihandle_t, char *, size_t); static ssize_t ofw_fdt_package_to_path(ofw_t, phandle_t, char *, size_t); static int ofw_fdt_interpret(ofw_t, const char *, int, cell_t *); static ofw_method_t ofw_fdt_methods[] = { OFWMETHOD(ofw_init, ofw_fdt_init), OFWMETHOD(ofw_peer, ofw_fdt_peer), OFWMETHOD(ofw_child, ofw_fdt_child), OFWMETHOD(ofw_parent, ofw_fdt_parent), OFWMETHOD(ofw_instance_to_package, ofw_fdt_instance_to_package), OFWMETHOD(ofw_getproplen, ofw_fdt_getproplen), OFWMETHOD(ofw_getprop, ofw_fdt_getprop), OFWMETHOD(ofw_nextprop, ofw_fdt_nextprop), OFWMETHOD(ofw_setprop, ofw_fdt_setprop), OFWMETHOD(ofw_canon, ofw_fdt_canon), OFWMETHOD(ofw_finddevice, ofw_fdt_finddevice), OFWMETHOD(ofw_instance_to_path, ofw_fdt_instance_to_path), OFWMETHOD(ofw_package_to_path, ofw_fdt_package_to_path), OFWMETHOD(ofw_interpret, ofw_fdt_interpret), { 0, 0 } };