1b98807d4SBenno Rice /*- 2b98807d4SBenno Rice * Copyright (c) 2001 by Thomas Moestl <tmm@FreeBSD.org>. 3b98807d4SBenno Rice * All rights reserved. 4b98807d4SBenno Rice * 5b98807d4SBenno Rice * Redistribution and use in source and binary forms, with or without 6b98807d4SBenno Rice * modification, are permitted provided that the following conditions 7b98807d4SBenno Rice * are met: 8b98807d4SBenno Rice * 1. Redistributions of source code must retain the above copyright 9b98807d4SBenno Rice * notice, this list of conditions and the following disclaimer. 10b98807d4SBenno Rice * 2. Redistributions in binary form must reproduce the above copyright 11b98807d4SBenno Rice * notice, this list of conditions and the following disclaimer in the 12b98807d4SBenno Rice * documentation and/or other materials provided with the distribution. 13b98807d4SBenno Rice * 14b98807d4SBenno Rice * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15b98807d4SBenno Rice * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16b98807d4SBenno Rice * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17b98807d4SBenno Rice * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18b98807d4SBenno Rice * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19b98807d4SBenno Rice * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20b98807d4SBenno Rice * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21b98807d4SBenno Rice * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22b98807d4SBenno Rice * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 23b98807d4SBenno Rice * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24b98807d4SBenno Rice * 25b98807d4SBenno Rice * $FreeBSD$ 26b98807d4SBenno Rice */ 27b98807d4SBenno Rice 28b98807d4SBenno Rice #ifndef _MACHINE_OFW_MACHDEP_H_ 29b98807d4SBenno Rice #define _MACHINE_OFW_MACHDEP_H_ 30b98807d4SBenno Rice 3191416fb2SNathan Whitehorn #include <sys/cdefs.h> 3291416fb2SNathan Whitehorn #include <sys/types.h> 3391416fb2SNathan Whitehorn #include <sys/rman.h> 34b98807d4SBenno Rice #include <sys/bus.h> 3591416fb2SNathan Whitehorn #include <dev/ofw/openfirm.h> 36b40ce02aSNathan Whitehorn #include <machine/platform.h> 3791416fb2SNathan Whitehorn 3891416fb2SNathan Whitehorn typedef uint32_t cell_t; 39b98807d4SBenno Rice 40949313b7SMarcel Moolenaar int OF_decode_addr(phandle_t, int, bus_space_tag_t *, bus_space_handle_t *); 41b98807d4SBenno Rice void OF_getetheraddr(device_t dev, u_char *addr); 42b98807d4SBenno Rice 4391416fb2SNathan Whitehorn void OF_initial_setup(void *fdt_ptr, void *junk, int (*openfirm)(void *)); 4491416fb2SNathan Whitehorn boolean_t OF_bootstrap(void); 4591416fb2SNathan Whitehorn 46b40ce02aSNathan Whitehorn void OF_reboot(void); 47b40ce02aSNathan Whitehorn 48b40ce02aSNathan Whitehorn void ofw_mem_regions(struct mem_region **, int *, struct mem_region **, int *); 499f706727SNathan Whitehorn void ofw_quiesce(void); /* Must be called before VM is up! */ 50b40ce02aSNathan Whitehorn 51b98807d4SBenno Rice #endif /* _MACHINE_OFW_MACHDEP_H_ */ 52