1107120Sjulian/*-
2107120Sjulian * Copyright (c) 2001 by Thomas Moestl <tmm@FreeBSD.org>.
3115185Sru * All rights reserved.
4107120Sjulian *
5107120Sjulian * Redistribution and use in source and binary forms, with or without
6107120Sjulian * modification, are permitted provided that the following conditions
7107120Sjulian * are met:
8107120Sjulian * 1. Redistributions of source code must retain the above copyright
9107120Sjulian *    notice, this list of conditions and the following disclaimer.
10107120Sjulian * 2. Redistributions in binary form must reproduce the above copyright
11107120Sjulian *    notice, this list of conditions and the following disclaimer in the
12115185Sru *    documentation and/or other materials provided with the distribution.
13107120Sjulian *
14107120Sjulian * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15107120Sjulian * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16107120Sjulian * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17107120Sjulian * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
18107120Sjulian * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19107120Sjulian * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20107120Sjulian * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21107120Sjulian * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22107120Sjulian * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
23107120Sjulian * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24115185Sru *
25121054Semax * $FreeBSD: releng/11.0/sys/sparc64/include/upa.h 203838 2010-02-13 16:52:33Z marius $
26107120Sjulian */
27115185Sru
28107120Sjulian#ifndef _MACHINE_UPA_H_
29107120Sjulian#define	_MACHINE_UPA_H_
30107120Sjulian
31107120Sjulian#define	UPA_MEMSTART	0x1c000000000UL
32115185Sru#define	UPA_MEMEND	0x1ffffffffffUL
33115185Sru
34107120Sjulian#define	UPA_CR_MID_SHIFT	(17)
35107120Sjulian#define	UPA_CR_MID_SIZE		(5)
36107120Sjulian#define	UPA_CR_MID_MASK							\
37122452Semax	(((1 << UPA_CR_MID_SIZE) - 1) << UPA_CR_MID_SHIFT)
38107120Sjulian
39107120Sjulian#define	UPA_CR_GET_MID(cr)	((cr & UPA_CR_MID_MASK) >> UPA_CR_MID_SHIFT)
40115185Sru
41107120Sjulian#endif /* _MACHINE_UPA_H_ */
42115185Sru