1 /* SPDX-License-Identifier: BSD-3-Clause */
7 * Topology interface definitions.
9 * Contains AMD AGESA internal interface for topology related data which
10 * is consumed by code other than Topology Services init.
12 * @xrefitem bom "File Content Label" "Release Content"
14 * @e sub-project: Core
15 * @e \$Revision$ @e \$Date$
17 /*****************************************************************************
19 * Copyright (c) 2008 - 2016, Advanced Micro Devices, Inc.
20 * All rights reserved.
22 * Redistribution and use in source and binary forms, with or without
23 * modification, are permitted provided that the following conditions are met:
24 * * Redistributions of source code must retain the above copyright
25 * notice, this list of conditions and the following disclaimer.
26 * * Redistributions in binary form must reproduce the above copyright
27 * notice, this list of conditions and the following disclaimer in the
28 * documentation and/or other materials provided with the distribution.
29 * * Neither the name of Advanced Micro Devices, Inc. nor the names of
30 * its contributors may be used to endorse or promote products derived
31 * from this software without specific prior written permission.
33 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
34 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
35 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
36 * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY
37 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
38 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
39 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
40 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
41 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
42 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 ***************************************************************************/
46 #include <check_for_wrapper.h>
51 // Defines for limiting data structure maximum allocation and limit checking.
53 #define MAX_SOCKETS MAX_NODES
57 * Socket and Module to Node Map Item.
58 * Provide the Node Id and core id range for each module in each processor.
61 UINT8 Node
; ///< The module's Node id.
62 UINT8 LowCore
; ///< The lowest processor core id for this module.
63 UINT8 HighCore
; ///< The highest processor core id for this module.
64 UINT8 EnabledComputeUnits
; ///< The value of Enabled for this processor module.
65 UINT8 DualCoreComputeUnits
; ///< The value of DualCore for this processor module.
66 UINT8 TripleCoreComputeUnits
;///< The value of TripleCore for this processor module.
67 UINT8 QuadCoreComputeUnits
; ///< The value of QuadCore for this processor module.
68 } SOCKET_DIE_TO_NODE_ITEM
;
71 * Socket and Module to Node Map.
72 * This type is a pointer to the actual map, it can be used for a struct item or
73 * for typecasting a heap buffer pointer.
75 typedef SOCKET_DIE_TO_NODE_ITEM (*SOCKET_DIE_TO_NODE_MAP
)[MAX_SOCKETS
][MAX_DIES
];
78 * Node id to Socket Die Map Item.
81 UINT8 Socket
; ///< socket of the processor containing the Node.
82 UINT8 Die
; ///< the module in the processor which is Node.
83 } NODE_TO_SOCKET_DIE_ITEM
;
86 * Node id to Socket Die Map.
88 typedef NODE_TO_SOCKET_DIE_ITEM (*NODE_TO_SOCKET_DIE_MAP
)[MAX_NODES
];
90 #endif // _TOPOLOGY_H_