186229Stmm/*-
286229Stmm * Copyright (c) 2001 by Thomas Moestl <tmm@FreeBSD.org>.
386229Stmm * All rights reserved.
486229Stmm *
586229Stmm * Redistribution and use in source and binary forms, with or without
686229Stmm * modification, are permitted provided that the following conditions
786229Stmm * are met:
886229Stmm * 1. Redistributions of source code must retain the above copyright
986229Stmm *    notice, this list of conditions and the following disclaimer.
1086229Stmm * 2. Redistributions in binary form must reproduce the above copyright
1186229Stmm *    notice, this list of conditions and the following disclaimer in the
1286229Stmm *    documentation and/or other materials provided with the distribution.
1386229Stmm *
1486229Stmm * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1586229Stmm * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1686229Stmm * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1786229Stmm * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
1886229Stmm * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1986229Stmm * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2086229Stmm * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2186229Stmm * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2286229Stmm * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
2386229Stmm * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2486229Stmm *
2586229Stmm * $FreeBSD$
2686229Stmm */
2786229Stmm
2886229Stmm#ifndef _MACHINE_OFW_MACHDEP_H_
2986229Stmm#define _MACHINE_OFW_MACHDEP_H_
3086229Stmm
3186229Stmm#include <sys/bus.h>
32186347Snwhitehorn#include <machine/bus.h>
33186347Snwhitehorn#include <dev/ofw/openfirm.h>
3486229Stmm
35186347Snwhitehorntypedef uint64_t cell_t;
36186347Snwhitehorn
37293057Snwhitehorn/* sparc64 doesn't use the interrupt parent #address-cells in interrupt maps */
38293057Snwhitehorn#define OFW_IMAP_NO_IPARENT_ADDR_CELLS
39293057Snwhitehorn
40141753Smariusint  OF_decode_addr(phandle_t, int, int *, bus_addr_t *);
41119697Smarcelvoid OF_getetheraddr(device_t, u_char *);
42207243Smariusu_int OF_getscsinitid(device_t);
43230632Smariusvoid OF_panic(const char *fmt, ...) __dead2 __printflike(1, 2);
44230632Smariusvoid cpu_shutdown(void *) __dead2;
45186347Snwhitehornint  ofw_entry(void *);
46230632Smariusvoid ofw_exit(void *) __dead2;
4786229Stmm
4886229Stmm#endif /* _MACHINE_OFW_MACHDEP_H_ */
49