182003Sjake/*-
282003Sjake * Copyright 2001 by Thomas Moestl <tmm@FreeBSD.org>.  All rights reserved.
382003Sjake *
482003Sjake * Redistribution and use in source and binary forms, with or without
582003Sjake * modification, are permitted provided that the following conditions
682003Sjake * are met:
782003Sjake * 1. Redistributions of source code must retain the above copyright
882003Sjake *    notice, this list of conditions and the following disclaimer.
982003Sjake * 2. Redistributions in binary form must reproduce the above copyright
1082003Sjake *    notice, this list of conditions and the following disclaimer in the
1182003Sjake *    documentation and/or other materials provided with the distribution.
1282003Sjake *
1382003Sjake * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1482003Sjake * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1582003Sjake * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1682003Sjake * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
1782003Sjake * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1882003Sjake * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1982003Sjake * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2082003Sjake * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2182003Sjake * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
2282003Sjake * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2382003Sjake *
2482003Sjake * $FreeBSD$
2582003Sjake */
2682003Sjake
2782003Sjake#ifndef	_MACHINE_LSU_H_
2882003Sjake#define	_MACHINE_LSU_H_
2982003Sjake
30100181Stmm/*
31100181Stmm * Definitions for the Load-Store-Unit Control Register. This is called
32206480Smarius * Data Cache Unit Control Register (DCUCR) for UltraSPARC-III and greater.
33100181Stmm */
3482003Sjake#define	LSU_IC		(1UL << 0)
3582003Sjake#define	LSU_DC		(1UL << 1)
3682003Sjake#define	LSU_IM		(1UL << 2)
3782003Sjake#define	LSU_DM		(1UL << 3)
3882003Sjake
39100181Stmm/* Parity control mask, UltraSPARC-I and II series only. */
4082003Sjake#define	LSU_FM_SHIFT	4
4182003Sjake#define	LSU_FM_BITS	16
4282003Sjake#define	LSU_FM_MASK	(((1UL << LSU_FM_BITS) - 1) << LSU_FM_SHIFT)
4382003Sjake
44206480Smarius#define	LSU_VM_SHIFT	25
4582003Sjake#define	LSU_VM_BITS	8
4682003Sjake#define	LSU_VM_MASK	(((1UL << LSU_VM_BITS) - 1) << LSU_VM_SHIFT)
4782003Sjake
4882003Sjake#define	LSU_PM_SHIFT	33
4982003Sjake#define	LSU_PM_BITS	8
5082003Sjake#define	LSU_PM_MASK	(((1UL << LSU_PM_BITS) - 1) << LSU_PM_SHIFT)
5182003Sjake
5282003Sjake#define	LSU_VW		(1UL << 21)
5382003Sjake#define	LSU_VR		(1UL << 22)
5482003Sjake#define	LSU_PW		(1UL << 23)
5582003Sjake#define	LSU_PR		(1UL << 24)
5682003Sjake
57100181Stmm/* The following bits are valid for the UltraSPARC-III series only. */
58100181Stmm#define	LSU_WE		(1UL << 41)
59100181Stmm#define	LSU_SL		(1UL << 42)
60100181Stmm#define	LSU_SPE		(1UL << 43)
61100181Stmm#define	LSU_HPE		(1UL << 44)
62100181Stmm#define	LSU_PE		(1UL << 45)
63100181Stmm#define	LSU_RE		(1UL << 46)
64100181Stmm#define	LSU_ME		(1UL << 47)
65100181Stmm#define	LSU_CV		(1UL << 48)
66100181Stmm#define	LSU_CP		(1UL << 49)
67100181Stmm
68206480Smarius/* The following bit is valid for the UltraSPARC-IV only. */
69206480Smarius#define	LSU_WIH		(1UL << 4)
70206480Smarius
71206480Smarius/* The following bits are valid for the UltraSPARC-IV+ only. */
72206480Smarius#define	LSU_PPS_SHIFT	50
73206480Smarius#define	LSU_PPS_BITS	2
74206480Smarius#define	LSU_PPS_MASK	(((1UL << LSU_PPS_BITS) - 1) << LSU_PPS_SHIFT)
75206480Smarius
76206480Smarius#define	LSU_IPS_SHIFT	52
77206480Smarius#define	LSU_IPS_BITS	2
78206480Smarius#define	LSU_IPS_MASK	(((1UL << LSU_IPS_BITS) - 1) << LSU_IPS_SHIFT)
79206480Smarius
80206480Smarius#define	LSU_PCM		(1UL << 54)
81206480Smarius#define	LSU_WCE		(1UL << 55)
82206480Smarius
83206480Smarius/* The following bit is valid for the SPARC64 V, VI, VII and VIIIfx only. */
84206480Smarius#define	LSU_WEAK_SPCA	(1UL << 41)
85206480Smarius
8682003Sjake#endif	/* _MACHINE_LSU_H_ */
87