199665Sbenno/*-
299665Sbenno * Copyright (c) 2001 by Thomas Moestl <tmm@FreeBSD.org>.
399665Sbenno * All rights reserved.
499665Sbenno *
599665Sbenno * Redistribution and use in source and binary forms, with or without
699665Sbenno * modification, are permitted provided that the following conditions
799665Sbenno * are met:
899665Sbenno * 1. Redistributions of source code must retain the above copyright
999665Sbenno *    notice, this list of conditions and the following disclaimer.
1099665Sbenno * 2. Redistributions in binary form must reproduce the above copyright
1199665Sbenno *    notice, this list of conditions and the following disclaimer in the
1299665Sbenno *    documentation and/or other materials provided with the distribution.
1399665Sbenno *
1499665Sbenno * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1599665Sbenno * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1699665Sbenno * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1799665Sbenno * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
1899665Sbenno * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1999665Sbenno * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2099665Sbenno * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2199665Sbenno * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2299665Sbenno * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
2399665Sbenno * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2499665Sbenno *
2599665Sbenno * $FreeBSD: releng/10.3/sys/powerpc/include/ofw_machdep.h 266020 2014-05-14 14:17:51Z ian $
2699665Sbenno */
2799665Sbenno
2899665Sbenno#ifndef _MACHINE_OFW_MACHDEP_H_
2999665Sbenno#define _MACHINE_OFW_MACHDEP_H_
3099665Sbenno
31186347Snwhitehorn#include <sys/cdefs.h>
32186347Snwhitehorn#include <sys/types.h>
33186347Snwhitehorn#include <sys/rman.h>
3499665Sbenno#include <sys/bus.h>
35186347Snwhitehorn#include <dev/ofw/openfirm.h>
36192067Snwhitehorn#include <machine/platform.h>
3799665Sbenno
38186347Snwhitehorntypedef	uint32_t	cell_t;
39186347Snwhitehorn
40160714Smarcelint  OF_decode_addr(phandle_t, int, bus_space_tag_t *, bus_space_handle_t *);
4199665Sbennovoid OF_getetheraddr(device_t dev, u_char *addr);
4299665Sbenno
43186347Snwhitehornvoid OF_initial_setup(void *fdt_ptr, void *junk, int (*openfirm)(void *));
44186347Snwhitehornboolean_t OF_bootstrap(void);
45186347Snwhitehorn
46192067Snwhitehornvoid OF_reboot(void);
47192067Snwhitehorn
48266020Sianvoid ofw_mem_regions(struct mem_region *, int *, struct mem_region *, int *);
49255910Snwhitehornvoid ofw_quiesce(void); /* Must be called before VM is up! */
50259235Sandreastvoid ofw_save_trap_vec(char *);
51192067Snwhitehorn
5299665Sbenno#endif /* _MACHINE_OFW_MACHDEP_H_ */
53