5 * AMD CPU BrandId related functions and structures.
7 * Contains code that provides CPU BrandId information
9 * @xrefitem bom "File Content Label" "Release Content"
12 * @e \$Revision: 56279 $ @e \$Date: 2011-07-11 13:11:28 -0600 (Mon, 11 Jul 2011) $
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.
43 ******************************************************************************
46 /*----------------------------------------------------------------------------------------
47 * M O D U L E S U S E D
48 *----------------------------------------------------------------------------------------
51 #include "cpuRegisters.h"
52 #include "cpuEarlyInit.h"
53 #include "cpuFamilyTranslation.h"
58 #define FILECODE PROC_CPU_FAMILY_0X10_CPUF10BRANDID_FILECODE
60 /*----------------------------------------------------------------------------------------
61 * D E F I N I T I O N S A N D M A C R O S
62 *----------------------------------------------------------------------------------------
65 /*----------------------------------------------------------------------------------------
66 * T Y P E D E F S A N D S T R U C T U R E S
67 *----------------------------------------------------------------------------------------
70 /*----------------------------------------------------------------------------------------
71 * P R O T O T Y P E S O F L O C A L F U N C T I O N S
72 *----------------------------------------------------------------------------------------
75 /*----------------------------------------------------------------------------------------
76 * E X P O R T E D F U N C T I O N S
77 *----------------------------------------------------------------------------------------
80 GetF10BrandIdString1 (
81 IN CPU_SPECIFIC_SERVICES *FamilySpecificServices,
82 OUT CONST VOID **BrandString1Ptr,
83 OUT UINT8 *NumberOfElements,
84 IN AMD_CONFIG_PARAMS *StdHeader
88 GetF10BrandIdString2 (
89 IN CPU_SPECIFIC_SERVICES *FamilySpecificServices,
90 OUT CONST VOID **BrandString2Ptr,
91 OUT UINT8 *NumberOfElements,
92 IN AMD_CONFIG_PARAMS *StdHeader
95 extern CPU_BRAND_TABLE *F10BrandIdString1Tables[];
96 extern CPU_BRAND_TABLE *F10BrandIdString2Tables[];
97 extern CONST UINT8 F10BrandIdString1TableCount;
98 extern CONST UINT8 F10BrandIdString2TableCount;
100 /*---------------------------------------------------------------------------------------
101 * T Y P E D E F S, S T R U C T U R E S, E N U M S
102 *---------------------------------------------------------------------------------------
106 /*---------------------------------------------------------------------------------------*/
108 * Returns a table containing the appropriate beginnings of the CPU brandstring.
110 * @CpuServiceMethod{::F_CPU_GET_FAMILY_SPECIFIC_ARRAY}.
112 * @param[in] FamilySpecificServices The current Family Specific Services.
113 * @param[out] BrandString1Ptr Points to the first entry in the table.
114 * @param[out] NumberOfElements Number of valid entries in the table.
115 * @param[in] StdHeader Header for library and services.
119 GetF10BrandIdString1 (
120 IN CPU_SPECIFIC_SERVICES *FamilySpecificServices,
121 OUT CONST VOID **BrandString1Ptr,
122 OUT UINT8 *NumberOfElements,
123 IN AMD_CONFIG_PARAMS *StdHeader
126 CPU_BRAND_TABLE **TableEntryPtr;
128 TableEntryPtr = &F10BrandIdString1Tables[0];
129 *BrandString1Ptr = TableEntryPtr;
130 *NumberOfElements = F10BrandIdString1TableCount;
134 /*---------------------------------------------------------------------------------------*/
136 * Returns a table containing the appropriate endings of the CPU brandstring.
138 * @CpuServiceMethod{::F_CPU_GET_FAMILY_SPECIFIC_ARRAY}.
140 * @param[in] FamilySpecificServices The current Family Specific Services.
141 * @param[out] BrandString2Ptr Points to the first entry in the table.
142 * @param[out] NumberOfElements Number of valid entries in the table.
143 * @param[in] StdHeader Header for library and services.
147 GetF10BrandIdString2 (
148 IN CPU_SPECIFIC_SERVICES *FamilySpecificServices,
149 OUT CONST VOID **BrandString2Ptr,
150 OUT UINT8 *NumberOfElements,
151 IN AMD_CONFIG_PARAMS *StdHeader
154 CPU_BRAND_TABLE **TableEntryPtr;
156 TableEntryPtr = &F10BrandIdString2Tables[0];
157 *BrandString2Ptr = TableEntryPtr;
158 *NumberOfElements = F10BrandIdString2TableCount;