5 * Topology interface definitions.
7 * Contains AMD AGESA internal interface for topology related data which
8 * is consumed by code other than HyperTransport init (and produced by
9 * HyperTransport init.)
11 * @xrefitem bom "File Content Label" "Release Content"
13 * @e sub-project: Core
14 * @e \$Revision: 44324 $ @e \$Date: 2010-12-22 02:16:51 -0700 (Wed, 22 Dec 2010) $
16 /*****************************************************************************
18 * Copyright (C) 2012 Advanced Micro Devices, Inc.
19 * All rights reserved.
21 * Redistribution and use in source and binary forms, with or without
22 * modification, are permitted provided that the following conditions are met:
23 * * Redistributions of source code must retain the above copyright
24 * notice, this list of conditions and the following disclaimer.
25 * * Redistributions in binary form must reproduce the above copyright
26 * notice, this list of conditions and the following disclaimer in the
27 * documentation and/or other materials provided with the distribution.
28 * * Neither the name of Advanced Micro Devices, Inc. nor the names of
29 * its contributors may be used to endorse or promote products derived
30 * from this software without specific prior written permission.
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
33 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
34 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
35 * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY
36 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
37 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
38 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
39 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
40 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
41 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 ***************************************************************************/
49 // Defines for limiting data structure maximum allocation and limit checking.
51 #define MAX_SOCKETS MAX_NODES
54 // Defines useful with package link
55 #define HT_LIST_MATCH_INTERNAL_LINK_0 0xFA
56 #define HT_LIST_MATCH_INTERNAL_LINK_1 0xFB
57 #define HT_LIST_MATCH_INTERNAL_LINK_2 0xFC
61 * This is a heap data structure. The Hops array is filled as a size x size matrix.
62 * The unused space, if any, is all at the end.
65 UINT8 Size; ///< The row and column size of actual hop count data */
66 UINT8 Hops[MAX_NODES * MAX_NODES]; ///< Room for a dynamic two dimensional array of [size][size] */
70 * Socket and Module to Node Map Item.
71 * Provide the Node Id and core id range for each module in each processor.
74 UINT8 Node; ///< The module's Node id.
75 UINT8 LowCore; ///< The lowest processor core id for this module.
76 UINT8 HighCore; ///< The highest processor core id for this module.
77 UINT8 EnabledComputeUnits; ///< The value of Enabled for this processor module.
78 UINT8 DualCoreComputeUnits; ///< The value of DualCore for this processor module.
79 } SOCKET_DIE_TO_NODE_ITEM;
82 * Socket and Module to Node Map.
83 * This type is a pointer to the actual map, it can be used for a struct item or
84 * for typecasting a heap buffer pointer.
86 typedef SOCKET_DIE_TO_NODE_ITEM (*SOCKET_DIE_TO_NODE_MAP)[MAX_SOCKETS][MAX_DIES];
89 * Node id to Socket Die Map Item.
92 UINT8 Socket; ///< socket of the processor containing the Node.
93 UINT8 Die; ///< the module in the processor which is Node.
94 } NODE_TO_SOCKET_DIE_ITEM;
97 * Node id to Socket Die Map.
99 typedef NODE_TO_SOCKET_DIE_ITEM (*NODE_TO_SOCKET_DIE_MAP)[MAX_NODES];
102 * Provide AP core with socket and node context at start up.
103 * This information is posted to the AP cores using a register as a mailbox.
106 UINT32 Node:4; ///< The node id of Core's node.
107 UINT32 Socket:4; ///< The socket of this Core's node.
108 UINT32 Module:2; ///< The internal module number for Core's node.
109 UINT32 ModuleType:2; ///< Single Module = 0, Multi-module = 1.
110 UINT32 :20; ///< Reserved
111 } AP_MAIL_INFO_FIELDS;
114 * AP info fields can be written and read to a register.
117 UINT32 Info; ///< Just a number for register access, or opaque passing.
118 AP_MAIL_INFO_FIELDS Fields; ///< access to the info fields.
122 * Provide AP core with system degree and system core number at start up.
123 * This information is posted to the AP cores using a register as a mailbox.
126 UINT32 SystemDegree:3; ///< The number of connected links
127 UINT32 :3; ///< Reserved
128 UINT32 HeapIndex:6; ///< The zero-based system core number
129 UINT32 :20; ///< Reserved
130 } AP_MAIL_EXT_INFO_FIELDS;
133 * AP info fields can be written and read to a register.
136 UINT32 Info; ///< Just a number for register access, or opaque passing.
137 AP_MAIL_EXT_INFO_FIELDS Fields; ///< access to the info fields.
141 * AP Info mailbox set.
144 AP_MAIL_INFO ApMailInfo; ///< The AP mail info
145 AP_MAIL_EXT_INFO ApMailExtInfo; ///< The extended AP mail info
149 * Provide a northbridge to package mapping for link assignments.
153 UINT8 Link; ///< The Node's link
154 UINT8 Module; ///< The internal module position of Node
155 UINT8 PackageLink; ///< The corresponding package link
156 } PACKAGE_HTLINK_MAP_ITEM;
159 * A Processor's complete set of link assignments
161 typedef PACKAGE_HTLINK_MAP_ITEM (*PACKAGE_HTLINK_MAP)[];
163 #endif // _TOPOLOGY_H_