1207537Smarius/*-
2207537Smarius * Copyright (c) 2010 Marius Strobl <marius@FreeBSD.org>
3207537Smarius * All rights reserved.
4207537Smarius *
5207537Smarius * Redistribution and use in source and binary forms, with or without
6207537Smarius * modification, are permitted provided that the following conditions
7207537Smarius * are met:
8207537Smarius * 1. Redistributions of source code must retain the above copyright
9207537Smarius *    notice, this list of conditions and the following disclaimer.
10207537Smarius * 2. Redistributions in binary form must reproduce the above copyright
11207537Smarius *    notice, this list of conditions and the following disclaimer in the
12207537Smarius *    documentation and/or other materials provided with the distribution.
13207537Smarius *
14207537Smarius * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15207537Smarius * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16207537Smarius * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17207537Smarius * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18207537Smarius * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19207537Smarius * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20207537Smarius * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21207537Smarius * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22207537Smarius * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23207537Smarius * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24207537Smarius * SUCH DAMAGE.
25207537Smarius *
26207537Smarius * $FreeBSD$
27207537Smarius */
28207537Smarius
29207537Smarius#ifndef	_MACHINE_MCNTL_H
30207537Smarius#define	_MACHINE_MCNTL_H
31207537Smarius
32207537Smarius/*
33207537Smarius * Definitions for the SPARC64 V, VI, VII and VIIIfx Memory Control Register
34207537Smarius */
35207537Smarius#define	MCNTL_JPS1_TSBP		(1UL << 8)
36207537Smarius
37207537Smarius#define	MCNTL_RMD_SHIFT		12
38207537Smarius#define	MCNTL_RMD_BITS		2
39207537Smarius#define	MCNTL_RMD_MASK							\
40207537Smarius	(((1UL << MCNTL_RMD_BITS) - 1) << MCNTL_RMD_SHIFT)
41207537Smarius#define	MCNTL_RMD_FULL		(0UL << MCNTL_RMD_SHIFT)
42207537Smarius#define	MCNTL_RMD_1024		(2UL << MCNTL_RMD_SHIFT)
43207537Smarius#define	MCNTL_RMD_512		(3UL << MCNTL_RMD_SHIFT)
44207537Smarius
45207537Smarius#define	MCNTL_FW_FDTLB		(1UL << 14)
46207537Smarius#define	MCNTL_FW_FITLB		(1UL << 15)
47207537Smarius#define	MCNTL_NC_CACHE		(1UL << 16)
48207537Smarius
49207537Smarius/* The following bits are valid for the SPARC64 VI, VII and VIIIfx only. */
50207537Smarius#define	MCNTL_MPG_SDTLB		(1UL << 6)
51207537Smarius#define	MCNTL_MPG_SITLB		(1UL << 7)
52207537Smarius
53207537Smarius/* The following bits are valid for the SPARC64 VIIIfx only. */
54207537Smarius#define	MCNTL_HPF_SHIFT		18
55207537Smarius#define	MCNTL_HPF_BITS		2
56207537Smarius#define	MCNTL_HPF_MASK							\
57207537Smarius	(((1UL << MCNTL_HPF_BITS) - 1) << MCNTL_HPF_SHIFT)
58207537Smarius#define	MCNTL_HPF_STRONG	(0UL << MCNTL_HPF_SHIFT)
59207537Smarius#define	MCNTL_HPF_NOT		(1UL << MCNTL_HPF_SHIFT)
60207537Smarius#define	MCNTL_HPF_WEAK		(2UL << MCNTL_HPF_SHIFT)
61207537Smarius
62207537Smarius#endif	/* _MACHINE_MCNTL_H */
63