1b98807d4SBenno Rice /*- 24d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 371e3c308SPedro F. Giffuni * 4b98807d4SBenno Rice * Copyright (c) 2001 by Thomas Moestl <tmm@FreeBSD.org>. 5b98807d4SBenno Rice * All rights reserved. 6b98807d4SBenno Rice * 7b98807d4SBenno Rice * Redistribution and use in source and binary forms, with or without 8b98807d4SBenno Rice * modification, are permitted provided that the following conditions 9b98807d4SBenno Rice * are met: 10b98807d4SBenno Rice * 1. Redistributions of source code must retain the above copyright 11b98807d4SBenno Rice * notice, this list of conditions and the following disclaimer. 12b98807d4SBenno Rice * 2. Redistributions in binary form must reproduce the above copyright 13b98807d4SBenno Rice * notice, this list of conditions and the following disclaimer in the 14b98807d4SBenno Rice * documentation and/or other materials provided with the distribution. 15b98807d4SBenno Rice * 16b98807d4SBenno Rice * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17b98807d4SBenno Rice * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18b98807d4SBenno Rice * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19b98807d4SBenno Rice * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 20b98807d4SBenno Rice * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21b98807d4SBenno Rice * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22b98807d4SBenno Rice * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23b98807d4SBenno Rice * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24b98807d4SBenno Rice * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 25b98807d4SBenno Rice * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26b98807d4SBenno Rice * 27b98807d4SBenno Rice * $FreeBSD$ 28b98807d4SBenno Rice */ 29b98807d4SBenno Rice 30b98807d4SBenno Rice #ifndef _MACHINE_OFW_MACHDEP_H_ 31b98807d4SBenno Rice #define _MACHINE_OFW_MACHDEP_H_ 32b98807d4SBenno Rice 3391416fb2SNathan Whitehorn #include <sys/cdefs.h> 3491416fb2SNathan Whitehorn #include <sys/types.h> 3591416fb2SNathan Whitehorn #include <sys/rman.h> 36b98807d4SBenno Rice #include <sys/bus.h> 3791416fb2SNathan Whitehorn #include <dev/ofw/openfirm.h> 38b40ce02aSNathan Whitehorn #include <machine/platform.h> 3991416fb2SNathan Whitehorn 40490ebb8fSJustin Hibbits struct mem_region; 41490ebb8fSJustin Hibbits struct numa_mem_region; 42490ebb8fSJustin Hibbits 4391416fb2SNathan Whitehorn typedef uint32_t cell_t; 44b98807d4SBenno Rice 45b98807d4SBenno Rice void OF_getetheraddr(device_t dev, u_char *addr); 46b98807d4SBenno Rice 4791416fb2SNathan Whitehorn void OF_initial_setup(void *fdt_ptr, void *junk, int (*openfirm)(void *)); 4891416fb2SNathan Whitehorn boolean_t OF_bootstrap(void); 4991416fb2SNathan Whitehorn 50b40ce02aSNathan Whitehorn void OF_reboot(void); 51b40ce02aSNathan Whitehorn 52c1cb22d7SNathan Whitehorn void ofw_mem_regions(struct mem_region *, int *, struct mem_region *, int *); 5349d9a597SJustin Hibbits void ofw_numa_mem_regions(struct numa_mem_region *, int *); 549f706727SNathan Whitehorn void ofw_quiesce(void); /* Must be called before VM is up! */ 55f367ffdeSAndreas Tobler void ofw_save_trap_vec(char *); 5649d9a597SJustin Hibbits int ofw_pcibus_get_domain(device_t dev, device_t child, int *domain); 5749d9a597SJustin Hibbits int ofw_pcibus_get_cpus(device_t dev, device_t child, enum cpu_sets op, 5849d9a597SJustin Hibbits size_t setsize, cpuset_t *cpuset); 59b40ce02aSNathan Whitehorn 60b98807d4SBenno Rice #endif /* _MACHINE_OFW_MACHDEP_H_ */ 61