5 * Initialize the 'common' way of running early initialization.
7 * Returns the table of initialization steps to perform at
10 * @xrefitem bom "File Content Label" "Release Content"
13 * @e \$Revision: 44324 $ @e \$Date: 2010-12-22 17:16:51 +0800 (Wed, 22 Dec 2010) $
17 ******************************************************************************
19 * Copyright (c) 2011, 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.
43 ******************************************************************************
46 /*----------------------------------------------------------------------------------------
47 * M O D U L E S U S E D
48 *----------------------------------------------------------------------------------------
51 #include "cpuFamilyTranslation.h"
53 #include "cpuEarlyInit.h"
55 RDATA_GROUP (G1_PEICC)
57 #define FILECODE PROC_CPU_CPUINITEARLYTABLE_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 GetCommonEarlyInitOnCoreTable (
81 IN CPU_SPECIFIC_SERVICES *FamilyServices,
82 OUT CONST S_PERFORM_EARLY_INIT_ON_CORE **Table,
83 IN AMD_CPU_EARLY_PARAMS *EarlyParams,
84 IN AMD_CONFIG_PARAMS *StdHeader
87 extern F_PERFORM_EARLY_INIT_ON_CORE McaInitializationAtEarly;
88 extern F_PERFORM_EARLY_INIT_ON_CORE SetRegistersFromTablesAtEarly;
89 extern F_PERFORM_EARLY_INIT_ON_CORE SetBrandIdRegistersAtEarly;
90 extern F_PERFORM_EARLY_INIT_ON_CORE LocalApicInitializationAtEarly;
91 extern F_PERFORM_EARLY_INIT_ON_CORE LoadMicrocodePatchAtEarly;
93 CONST S_PERFORM_EARLY_INIT_ON_CORE ROMDATA CommonEarlyInitOnCoreTable[] =
95 {McaInitializationAtEarly, PERFORM_EARLY_ANY_CONDITION},
96 {SetRegistersFromTablesAtEarly, PERFORM_EARLY_ANY_CONDITION},
97 {SetBrandIdRegistersAtEarly, PERFORM_EARLY_ANY_CONDITION},
98 {LocalApicInitializationAtEarly, PERFORM_EARLY_ANY_CONDITION},
99 {LoadMicrocodePatchAtEarly, PERFORM_EARLY_ANY_CONDITION},
103 /*------------------------------------------------------------------------------------*/
105 * Initializer routine that may be invoked at AmdCpuEarly to return the steps that a
106 * processor that uses the standard initialization steps should take.
108 * @CpuServiceMethod{::F_GET_EARLY_INIT_TABLE}.
110 * @param[in] FamilyServices The current Family Specific Services.
111 * @param[out] Table Table of appropriate init steps for the executing core.
112 * @param[in] EarlyParams Service Interface structure to initialize.
113 * @param[in] StdHeader Opaque handle to standard config header.
117 GetCommonEarlyInitOnCoreTable (
118 IN CPU_SPECIFIC_SERVICES *FamilyServices,
119 OUT CONST S_PERFORM_EARLY_INIT_ON_CORE **Table,
120 IN AMD_CPU_EARLY_PARAMS *EarlyParams,
121 IN AMD_CONFIG_PARAMS *StdHeader
124 *Table = CommonEarlyInitOnCoreTable;