blob: 4ed896bbe78a5d1cda35911aba3dc1d373e259e5 [file] [log] [blame]
Frank Vibrans2b4c8312011-02-14 18:30:54 +00001/* $NoKeywords:$ */
2/**
3 * @file
4 *
5 * AMD CPU BrandId related functions and structures.
6 *
7 * Contains code that provides CPU BrandId information
8 *
9 * @xrefitem bom "File Content Label" "Release Content"
10 * @e project: AGESA
11 * @e sub-project: CPU
efdesign9884cbce22011-08-04 12:09:17 -060012 * @e \$Revision: 45203 $ @e \$Date: 2011-01-13 12:36:39 -0700 (Thu, 13 Jan 2011) $
Frank Vibrans2b4c8312011-02-14 18:30:54 +000013 *
14 */
15/*
16 *****************************************************************************
17 *
18 * Copyright (c) 2011, Advanced Micro Devices, Inc.
19 * All rights reserved.
Edward O'Callaghan1542a6f2014-07-06 19:24:06 +100020 *
Frank Vibrans2b4c8312011-02-14 18:30:54 +000021 * 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.
Edward O'Callaghan1542a6f2014-07-06 19:24:06 +100028 * * Neither the name of Advanced Micro Devices, Inc. nor the names of
29 * its contributors may be used to endorse or promote products derived
Frank Vibrans2b4c8312011-02-14 18:30:54 +000030 * from this software without specific prior written permission.
Edward O'Callaghan1542a6f2014-07-06 19:24:06 +100031 *
Frank Vibrans2b4c8312011-02-14 18:30:54 +000032 * 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.
Edward O'Callaghan1542a6f2014-07-06 19:24:06 +100042 *
Frank Vibrans2b4c8312011-02-14 18:30:54 +000043 * ***************************************************************************
44 *
45 */
46
47/*----------------------------------------------------------------------------------------
48 * M O D U L E S U S E D
49 *----------------------------------------------------------------------------------------
50 */
51#include "AGESA.h"
52#include "cpuRegisters.h"
53#include "cpuEarlyInit.h"
54#include "F14PackageType.h"
55
56/*----------------------------------------------------------------------------------------
57 * D E F I N I T I O N S A N D M A C R O S
58 *----------------------------------------------------------------------------------------
59 */
60
61/*----------------------------------------------------------------------------------------
62 * T Y P E D E F S A N D S T R U C T U R E S
63 *----------------------------------------------------------------------------------------
64 */
65
66/*----------------------------------------------------------------------------------------
67 * 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
68 *----------------------------------------------------------------------------------------
69 */
70
71/*----------------------------------------------------------------------------------------
72 * E X P O R T E D F U N C T I O N S
73 *----------------------------------------------------------------------------------------
74 */
75
76// String1
77CONST CHAR8 ROMDATA str_AMD_C[] = "AMD C-";
78CONST CHAR8 ROMDATA str_AMD_E[] = "AMD E-";
79CONST CHAR8 ROMDATA str_AMD_G_T[] = "AMD G-T";
efdesign9884cbce22011-08-04 12:09:17 -060080CONST CHAR8 ROMDATA str_AMD_Z[] = "AMD Z-";
Frank Vibrans2b4c8312011-02-14 18:30:54 +000081
82// String2
83CONST CHAR8 ROMDATA str___Processor[] = " Processor";
84CONST CHAR8 ROMDATA str___0_Processor[] = "0 Processor";
85CONST CHAR8 ROMDATA str_5_Processor[] = "5 Processor";
86CONST CHAR8 ROMDATA str_0x_Processor[] = "0x Processor";
87CONST CHAR8 ROMDATA str_5x_Processor[] = "5x Processor";
88CONST CHAR8 ROMDATA str_x_Processor[] = "x Processor";
89CONST CHAR8 ROMDATA str_L_Processor[] = "L Processor";
90CONST CHAR8 ROMDATA str_N_Processor[] = "N Processor";
91CONST CHAR8 ROMDATA str_R_Processor[] = "R Processor";
efdesign9884cbce22011-08-04 12:09:17 -060092CONST CHAR8 ROMDATA str_E_Processor[] = "E Processor";
93CONST CHAR8 ROMDATA str_0D_APU[] = "0D APU with Radeon(tm) HD Graphics";
94CONST CHAR8 ROMDATA str_0_APU[] = "0 APU with Radeon(tm) HD Graphics";
95CONST CHAR8 ROMDATA str_5_APU[] = "5 APU with Radeon(tm) HD Graphics";
96CONST CHAR8 ROMDATA str_APU[] = " APU with Radeon(tm) HD Graphics";
Frank Vibrans2b4c8312011-02-14 18:30:54 +000097
98/*---------------------------------------------------------------------------------------
99 * T Y P E D E F S, S T R U C T U R E S, E N U M S
100 *---------------------------------------------------------------------------------------
101 */
102
103CONST AMD_CPU_BRAND ROMDATA CpuF14OnBrandIdString1ArrayFt1[] =
104{
105 // FT1
106 {1, 0, 1, ON_SOCKET_FT1, str_AMD_C, sizeof (str_AMD_C)},
107 {2, 0, 1, ON_SOCKET_FT1, str_AMD_C, sizeof (str_AMD_C)},
108 {1, 0, 2, ON_SOCKET_FT1, str_AMD_E, sizeof (str_AMD_E)},
109 {2, 0, 2, ON_SOCKET_FT1, str_AMD_E, sizeof (str_AMD_E)},
efdesign9884cbce22011-08-04 12:09:17 -0600110 {2, 0, 3, ON_SOCKET_FT1, str_AMD_Z, sizeof (str_AMD_Z)},
Frank Vibrans2b4c8312011-02-14 18:30:54 +0000111 {1, 0, 4, ON_SOCKET_FT1, str_AMD_G_T, sizeof (str_AMD_G_T)},
112 {2, 0, 4, ON_SOCKET_FT1, str_AMD_G_T, sizeof (str_AMD_G_T)}
113}; //Cores, page, index, socket, stringstart, stringlength
114
115
116CONST AMD_CPU_BRAND ROMDATA CpuF14OnBrandIdString2ArrayFt1[] =
117{
118 // FT1
119 {1, 0, 0x01, ON_SOCKET_FT1, str___Processor, sizeof (str___Processor)},
120 {2, 0, 0x01, ON_SOCKET_FT1, str___Processor, sizeof (str___Processor)},
121 {1, 0, 0x02, ON_SOCKET_FT1, str___0_Processor, sizeof (str___0_Processor)},
122 {2, 0, 0x02, ON_SOCKET_FT1, str___0_Processor, sizeof (str___0_Processor)},
123 {1, 0, 0x03, ON_SOCKET_FT1, str_5_Processor, sizeof (str_5_Processor)},
124 {2, 0, 0x03, ON_SOCKET_FT1, str_5_Processor, sizeof (str_5_Processor)},
125 {1, 0, 0x04, ON_SOCKET_FT1, str_0x_Processor, sizeof (str_0x_Processor)},
126 {2, 0, 0x04, ON_SOCKET_FT1, str_0x_Processor, sizeof (str_0x_Processor)},
127 {1, 0, 0x05, ON_SOCKET_FT1, str_5x_Processor, sizeof (str_5x_Processor)},
128 {2, 0, 0x05, ON_SOCKET_FT1, str_5x_Processor, sizeof (str_5x_Processor)},
129 {1, 0, 0x06, ON_SOCKET_FT1, str_x_Processor, sizeof (str_x_Processor)},
130 {2, 0, 0x06, ON_SOCKET_FT1, str_x_Processor, sizeof (str_x_Processor)},
131 {1, 0, 0x07, ON_SOCKET_FT1, str_L_Processor, sizeof (str_L_Processor)},
132 {2, 0, 0x07, ON_SOCKET_FT1, str_L_Processor, sizeof (str_L_Processor)},
133 {1, 0, 0x08, ON_SOCKET_FT1, str_N_Processor, sizeof (str_N_Processor)},
134 {2, 0, 0x08, ON_SOCKET_FT1, str_N_Processor, sizeof (str_N_Processor)},
135 {1, 0, 0x09, ON_SOCKET_FT1, str_R_Processor, sizeof (str_R_Processor)},
efdesign9884cbce22011-08-04 12:09:17 -0600136 {2, 0, 0x09, ON_SOCKET_FT1, str_0_APU, sizeof (str_0_APU)},
137 {1, 0, 0x0A, ON_SOCKET_FT1, str_0_APU, sizeof (str_0_APU)},
138 {2, 0, 0x0A, ON_SOCKET_FT1, str_5_APU, sizeof (str_5_APU)},
139 {1, 0, 0x0B, ON_SOCKET_FT1, str_5_APU, sizeof (str_5_APU)},
140 {2, 0, 0x0B, ON_SOCKET_FT1, str_APU, sizeof (str_APU)},
141 {1, 0, 0x0C, ON_SOCKET_FT1, str_APU, sizeof (str_APU)},
142 {2, 0, 0x0C, ON_SOCKET_FT1, str_E_Processor, sizeof (str_E_Processor)},
143 {1, 0, 0x0D, ON_SOCKET_FT1, str_0D_APU, sizeof (str_0D_APU)},
144 {2, 0, 0x0D, ON_SOCKET_FT1, str_0D_APU, sizeof (str_0D_APU)},
Frank Vibrans2b4c8312011-02-14 18:30:54 +0000145 {1, 0, 0x0F, ON_SOCKET_FT1, 0, 0}, //Size 0 for no suffix
146 {2, 0, 0x0F, ON_SOCKET_FT1, 0, 0}, //Size 0 for no suffix
147 }; //Cores, page, index, socket, stringstart, stringlength
148
149
150CONST CPU_BRAND_TABLE ROMDATA F14OnBrandIdString1ArrayFt1 = {
151 (sizeof (CpuF14OnBrandIdString1ArrayFt1) / sizeof (AMD_CPU_BRAND)),
152 CpuF14OnBrandIdString1ArrayFt1
153};
154
155
156CONST CPU_BRAND_TABLE ROMDATA F14OnBrandIdString2ArrayFt1 = {
157 (sizeof (CpuF14OnBrandIdString2ArrayFt1) / sizeof (AMD_CPU_BRAND)),
158 CpuF14OnBrandIdString2ArrayFt1
159};
160
161