1139825Simp/*-
286229Stmm * Copyright (c) 1999 Matthew R. Green
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.
13219567Smarius *
14219567Smarius * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15219567Smarius * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16219567Smarius * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17219567Smarius * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18219567Smarius * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
19219567Smarius * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20219567Smarius * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
21219567Smarius * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22219567Smarius * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23219567Smarius * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24219567Smarius * SUCH DAMAGE.
25219567Smarius */
26219567Smarius
27219567Smarius/*-
28219567Smarius * Copyright (c) 1998, 1999 Eduardo E. Horvath
29219567Smarius * All rights reserved.
30219567Smarius *
31219567Smarius * Redistribution and use in source and binary forms, with or without
32219567Smarius * modification, are permitted provided that the following conditions
33219567Smarius * are met:
34219567Smarius * 1. Redistributions of source code must retain the above copyright
35219567Smarius *    notice, this list of conditions and the following disclaimer.
36219567Smarius * 2. Redistributions in binary form must reproduce the above copyright
37219567Smarius *    notice, this list of conditions and the following disclaimer in the
38219567Smarius *    documentation and/or other materials provided with the distribution.
3986229Stmm * 3. The name of the author may not be used to endorse or promote products
4086229Stmm *    derived from this software without specific prior written permission.
4186229Stmm *
4286229Stmm * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
4386229Stmm * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
4486229Stmm * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
4586229Stmm * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
4686229Stmm * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
4786229Stmm * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4886229Stmm * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
4986229Stmm * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
5086229Stmm * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
5186229Stmm * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
5286229Stmm * SUCH DAMAGE.
5386229Stmm *
54219567Smarius *	from: NetBSD: psychoreg.h,v 1.14 2008/05/30 02:29:37 mrg Exp
5586229Stmm *
5686229Stmm * $FreeBSD$
5786229Stmm */
5886229Stmm
59167308Smarius#ifndef _MACHINE_OFW_NEXUS_H_
60167308Smarius#define	_MACHINE_OFW_NEXUS_H_
6186229Stmm
6286229Stmm/*
63167308Smarius * These are the regs used for devices on the nexus. They apply to all of
64167308Smarius * Fireplane/Safari, JBus and UPA.
6586229Stmm */
6686229Stmm
67167308Smariusstruct nexus_regs {
68167308Smarius	uint32_t	phys_hi;
69167308Smarius	uint32_t	phys_lo;
70167308Smarius	uint32_t	size_hi;
71167308Smarius	uint32_t	size_lo;
7286229Stmm};
7386229Stmm
74167308Smarius#define	NEXUS_REG_PHYS(r) \
75167308Smarius	(((uint64_t)(r)->phys_hi << 32) | (uint64_t)(r)->phys_lo)
76167308Smarius#define	NEXUS_REG_SIZE(r) \
77167308Smarius	(((uint64_t)(r)->size_hi << 32) | (uint64_t)(r)->size_lo)
7888823Stmm
79167308Smarius#endif /* !_MACHINE_OFW_NEXUS_H_ */
80