ofw_machdep.h revision 302408
184865Sobrien/*-
2218822Sdim * Copyright (c) 2001 by Thomas Moestl <tmm@FreeBSD.org>.
3218822Sdim * All rights reserved.
484865Sobrien *
584865Sobrien * Redistribution and use in source and binary forms, with or without
6104834Sobrien * modification, are permitted provided that the following conditions
784865Sobrien * are met:
8104834Sobrien * 1. Redistributions of source code must retain the above copyright
9104834Sobrien *    notice, this list of conditions and the following disclaimer.
10104834Sobrien * 2. Redistributions in binary form must reproduce the above copyright
11104834Sobrien *    notice, this list of conditions and the following disclaimer in the
1284865Sobrien *    documentation and/or other materials provided with the distribution.
13104834Sobrien *
14104834Sobrien * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15104834Sobrien * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16104834Sobrien * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1784865Sobrien * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
18104834Sobrien * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19104834Sobrien * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20218822Sdim * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2184865Sobrien * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22218822Sdim * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
2384865Sobrien * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2484865Sobrien *
2584865Sobrien * $FreeBSD: stable/11/sys/sparc64/include/ofw_machdep.h 293057 2016-01-02 19:28:35Z nwhitehorn $
2684865Sobrien */
2794536Sobrien
2884865Sobrien#ifndef _MACHINE_OFW_MACHDEP_H_
2994536Sobrien#define _MACHINE_OFW_MACHDEP_H_
3084865Sobrien
3184865Sobrien#include <sys/bus.h>
3284865Sobrien#include <machine/bus.h>
33218822Sdim#include <dev/ofw/openfirm.h>
34218822Sdim
3584865Sobrientypedef uint64_t cell_t;
3684865Sobrien
3784865Sobrien/* sparc64 doesn't use the interrupt parent #address-cells in interrupt maps */
3884865Sobrien#define OFW_IMAP_NO_IPARENT_ADDR_CELLS
3984865Sobrien
4084865Sobrienint  OF_decode_addr(phandle_t, int, int *, bus_addr_t *);
4184865Sobrienvoid OF_getetheraddr(device_t, u_char *);
4284865Sobrienu_int OF_getscsinitid(device_t);
4394536Sobrienvoid OF_panic(const char *fmt, ...) __dead2 __printflike(1, 2);
4494536Sobrienvoid cpu_shutdown(void *) __dead2;
4584865Sobrienint  ofw_entry(void *);
4684865Sobrienvoid ofw_exit(void *) __dead2;
4784865Sobrien
4884865Sobrien#endif /* _MACHINE_OFW_MACHDEP_H_ */
4984865Sobrien