ofw_nexus.h revision 167308
10Sstevel@tonic-gate/*- 20Sstevel@tonic-gate * Copyright (c) 1998, 1999 Eduardo E. Horvath 30Sstevel@tonic-gate * Copyright (c) 1999 Matthew R. Green 40Sstevel@tonic-gate * All rights reserved. 50Sstevel@tonic-gate * 60Sstevel@tonic-gate * Redistribution and use in source and binary forms, with or without 70Sstevel@tonic-gate * modification, are permitted provided that the following conditions 80Sstevel@tonic-gate * are met: 90Sstevel@tonic-gate * 1. Redistributions of source code must retain the above copyright 100Sstevel@tonic-gate * notice, this list of conditions and the following disclaimer. 110Sstevel@tonic-gate * 2. Redistributions in binary form must reproduce the above copyright 120Sstevel@tonic-gate * notice, this list of conditions and the following disclaimer in the 130Sstevel@tonic-gate * documentation and/or other materials provided with the distribution. 140Sstevel@tonic-gate * 3. The name of the author may not be used to endorse or promote products 150Sstevel@tonic-gate * derived from this software without specific prior written permission. 160Sstevel@tonic-gate * 170Sstevel@tonic-gate * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 180Sstevel@tonic-gate * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 190Sstevel@tonic-gate * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 200Sstevel@tonic-gate * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 210Sstevel@tonic-gate * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 220Sstevel@tonic-gate * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 230Sstevel@tonic-gate * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 240Sstevel@tonic-gate * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 250Sstevel@tonic-gate * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 260Sstevel@tonic-gate * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 270Sstevel@tonic-gate * SUCH DAMAGE. 280Sstevel@tonic-gate * 290Sstevel@tonic-gate * from: NetBSD: psychoreg.h,v 1.8 2001/09/10 16:17:06 eeh Exp 300Sstevel@tonic-gate * 310Sstevel@tonic-gate * $FreeBSD: head/sys/sparc64/include/ofw_nexus.h 167308 2007-03-07 21:13:51Z marius $ 320Sstevel@tonic-gate */ 330Sstevel@tonic-gate 340Sstevel@tonic-gate#ifndef _MACHINE_OFW_NEXUS_H_ 350Sstevel@tonic-gate#define _MACHINE_OFW_NEXUS_H_ 360Sstevel@tonic-gate 370Sstevel@tonic-gate/* 380Sstevel@tonic-gate * These are the regs used for devices on the nexus. They apply to all of 390Sstevel@tonic-gate * Fireplane/Safari, JBus and UPA. 400Sstevel@tonic-gate */ 410Sstevel@tonic-gate 420Sstevel@tonic-gatestruct nexus_regs { 430Sstevel@tonic-gate uint32_t phys_hi; 440Sstevel@tonic-gate uint32_t phys_lo; 450Sstevel@tonic-gate uint32_t size_hi; 460Sstevel@tonic-gate uint32_t size_lo; 470Sstevel@tonic-gate}; 480Sstevel@tonic-gate 490Sstevel@tonic-gate#define NEXUS_REG_PHYS(r) \ 500Sstevel@tonic-gate (((uint64_t)(r)->phys_hi << 32) | (uint64_t)(r)->phys_lo) 510Sstevel@tonic-gate#define NEXUS_REG_SIZE(r) \ 520Sstevel@tonic-gate (((uint64_t)(r)->size_hi << 32) | (uint64_t)(r)->size_lo) 530Sstevel@tonic-gate 540Sstevel@tonic-gate#endif /* !_MACHINE_OFW_NEXUS_H_ */ 550Sstevel@tonic-gate