summaryrefslogtreecommitdiff
path: root/usr/src/uts/intel/io/mc-amd/mcamd_dimmcfg_impl.h
blob: 96205e5bc4873a01a607619b988595141744fd2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License (the "License").
 * You may not use this file except in compliance with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */

/*
 * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 */

#ifndef _MCAMD_DIMMCFG_IMPL_H
#define	_MCAMD_DIMMCFG_IMPL_H

#include <sys/types.h>
#include <sys/x86_archext.h>
#include <sys/mc_amd.h>
#include <mcamd_dimmcfg.h>

#ifdef __cplusplus
extern "C" {
#endif

/*
 * Defines for csl_chan
 */
#define	CH_A	0
#define	CH_B	1

/*
 * Line structure for the tables.  We include up to 2 chip-selects per
 * line - the consumer must use the first in 64-bit mode and both in
 * 128-bit mode.
 */
struct mcdcfg_csmapline {
	uint32_t csm_pkg;	/* applicable package types */
	uint8_t	csm_basereg;	/* csbase register number; implies mask */
	uint8_t csm_dimmcfg;	/* bitmask of DIMM_{N,R4,S4} which apply */
	uint8_t	csm_ldimm;	/* Logical DIMM number */
	const struct mcdcfg_csl csm_cs[MC_CHIP_DIMMPERCS];
};

/*
 * Defines for use with csm_pkg - pre-NPT packages
 */
#define	SKT_754		X86_SOCKET_754
#define	SKT_939		X86_SOCKET_939
#define	SKT_940		X86_SOCKET_940
#define	SKT_ALL		(X86_SOCKET_754 | X86_SOCKET_939 | X86_SOCKET_940)

/*
 * Defines for use with csm_pkg - NPT packages
 */
#define	F1207		X86_SOCKET_F1207
#define	AM2		X86_SOCKET_AM2
#define	S1g1		X86_SOCKET_S1g1
#define	SKT_NPT		(X86_SOCKET_S1g1 | X86_SOCKET_AM2 | X86_SOCKET_F1207)
#define	AM2F1207	(X86_SOCKET_AM2 | X86_SOCKET_F1207)
#define	AM2S1g1		(X86_SOCKET_AM2 | X86_SOCKET_S1g1)

/*
 * Defines for use with csm_dimmcfg
 */
#define	DCFG_N		0x1	/* Normal */
#define	DCFG_R4		0x2	/* Four-rank registered DIMM */
#define	DCFG_S4		0x4	/* four-rank SO-DIMM (NPT only) */
#define	DCFG_ALL	(DCFG_N | DCFG_R4)
#define	DCFG_ALLNPT	(DCFG_N | DCFG_R4 | DCFG_S4)

#ifdef __cplusplus
}
#endif

#endif /* _MCAMD_DIMMCFG_IMPL_H */