blob: efe95cae2775ae3de0623235c580f71d5d54eb82 [file] [log] [blame]
Frank Vibrans2b4c8312011-02-14 18:30:54 +00001/* $NoKeywords:$ */
2/**
3 * @file
4 *
5 * Implements the workaround for encrypted microcode patch loading.
6 *
7 * Returns the table of initialization steps to perform at
8 * AmdInitEarly.
9 *
10 * @xrefitem bom "File Content Label" "Release Content"
11 * @e project: AGESA
12 * @e sub-project: CPU/FAMILY/0x14/ON
13 * @e \$Revision: 37004 $ @e \$Date: 2010-08-28 02:23:00 +0800 (Sat, 28 Aug 2010) $
14 *
15 */
16/*
17 *****************************************************************************
18 *
19 * Copyright (c) 2011, Advanced Micro Devices, Inc.
20 * All rights reserved.
Edward O'Callaghane963b382014-07-06 19:27:14 +100021 *
Frank Vibrans2b4c8312011-02-14 18:30:54 +000022 * 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.
Edward O'Callaghane963b382014-07-06 19:27:14 +100029 * * Neither the name of Advanced Micro Devices, Inc. nor the names of
30 * its contributors may be used to endorse or promote products derived
Frank Vibrans2b4c8312011-02-14 18:30:54 +000031 * from this software without specific prior written permission.
Edward O'Callaghane963b382014-07-06 19:27:14 +100032 *
Frank Vibrans2b4c8312011-02-14 18:30:54 +000033 * 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.
Edward O'Callaghane963b382014-07-06 19:27:14 +100043 *
Frank Vibrans2b4c8312011-02-14 18:30:54 +000044 * ***************************************************************************
45 *
46 */
47
48VOID
49F14NbBufferAllocationAtEarly (
50 IN CPU_SPECIFIC_SERVICES *FamilyServices,
51 IN AMD_CPU_EARLY_PARAMS *EarlyParams,
52 IN AMD_CONFIG_PARAMS *StdHeader
53 );
54
55
56/// define NB buffer allocation setting
57typedef struct _NB_BUFFER_ALLOCATION {
58 D18F3x6C_STRUCT D18F3x6C; ///< reg for D18F3x6C
59 D18F3x74_STRUCT D18F3x74; ///< reg for D18F3x74
60 D18F3x7C_STRUCT D18F3x7C; ///< reg for D18F3x7C
61 D18F3x17C_STRUCT D18F3x17C; ///< reg for D18F3x17C
62} NB_BUFFER_ALLOCATION;
63
64/// enum for ON Erratum 463 wrokaround
65typedef enum {
66 ON_ERRATUM463_WORKAROUND_DISABLE = 0, ///< work around disable
67 ON_ERRATUM463_WORKAROUND_ENABLE = 1, ///< work around enable
68} ON_ERRATUM463_WORKAROUND;
69