aboutsummaryrefslogtreecommitdiffstats
path: root/Platforms/AMD/Styx/Binary/AmdModulePkg/Common/SocConfiguration.h
blob: 4ca97858f8f5f429565ec6dd39a19240c7b48f29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/* $NoKeywords */
/**
 * @file
 *
 * SocConfiguration.h
 *
 * Contains SoC Fuse Data structure definitions.
 *
 * @xrefitem bom "File Content Label" "Release Content"
 * @e project: FDK
 * @e sub-project: UEFI
 * @e version: $Revision: 334098 $ @e date: $Date: 2016-01-08 14:21:15 -0600 (Fri, 08 Jan 2016) $
 *
 */
/*****************************************************************************
*
*  Copyright 2013 - 2016 ADVANCED MICRO DEVICES, INC.  All Rights Reserved.
*
*  This program and the accompanying materials are licensed and made available
*  under the terms and conditions of the BSD License which accompanies this
*  distribution. The full text of the license may be found at
*  http://opensource.org/licenses/bsd-license.php
*
*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR
*  IMPLIED.
*
***************************************************************************/

//#########################################################################
//#########################################################################
//#########################################################################
//        NOTE: This file shared between SCP and UEFI, make sure all     //
//              changes are reflected in both copies.                    //
//#########################################################################
//#########################################################################
//#########################################################################

#ifndef __SOC_CONFIGURATION_H_
#define __SOC_CONFIGURATION_H_

#ifdef __cplusplus
  extern "C" {
  #endif


/*----------------------------------------------------------------------------------------
 *                             M O D U L E S    U S E D
 *----------------------------------------------------------------------------------------
 */
  #include "ProcessorBind.h"

/*----------------------------------------------------------------------------------------
 *                   D E F I N I T I O N S    A N D    M A C R O S
 *----------------------------------------------------------------------------------------
 */
#define SOC_BRAND_NAME_SIZE     (48)

/*----------------------------------------------------------------------------------------
 *                  T Y P E D E F S     A N D     S T R U C T U R E S
 *----------------------------------------------------------------------------------------
 */
  /// SOC Security Modes Enumeration
  typedef enum {
    SOC_SECURITY_MODE_BLANK     = 0,        ///< Security Mode Blank
    SOC_SECURITY_MODE_NOT_SECURE,           ///< Security Mode Non-secure
    SOC_SECURITY_MODE_SECURE,               ///< Security Mode Secure
    SOC_SECURITY_MODE_UNDEFINED,            ///< Security Mode Undefined
  } SOC_SECURITY_MODES;

  /// SOC Configuration, i.e. fusing structure
  typedef struct {
    UINT64   SerialNumber;                   ///< SOC Serial Number
    SOC_SECURITY_MODES  SecurityState;       ///< Indicates what security mode the SOC is in.
    INT32    CpuMap;                         ///< Map of CPU cores in SOC.
    INT32    CpuDefaultAClock;               ///< Default fused core frequency
    INT32    CpuClusterCount;                ///< Number of CPU clusters in SOC.
    INT32    CpuCoreCount;                   ///< Number of CPU cores in SOC.
    INT32    CpuClusterBoot;                 ///< Primary cluster used for boot.
    INT32    CpuCoreBoot;                    ///< Primary core used for boot.
    INT32    CcpEnabled;                     ///< Indicates CCP enabled state.  Zero if disabled; otherwise, enabled.
    INT32    PcieEnabled;                    ///< Indicates PCIe enabled state.  Zero if disabled; otherwise, enabled.
    INT32    SataEnabled;                    ///< Indicates SATA enabled state.  Zero if disabled; otherwise, enabled.
    INT32    XgeEnabled;                     ///< Indicates 10 gigabit Ethernet port enabled state.  Zero if disabled; otherwise, enabled.
    UINT32   BrandId;                        ///< Brand ID
    UINT32   ConfigurationId;                ///< Configuration ID
    UINT32   CpuIdModel;                     ///< CPU ID - Model
    UINT32   CpuIdExtModel;                  ///< CPU ID - Extended Model
    UINT32   CpuIdStepping;                  ///< CPU ID - Stepping
    UINT32   FixedErrata;                    ///< Fixed Errata
    UINT32   InternalRevision;               ///< Internal Revision
    UINT32   ManufacturingSpecifiedId;       ///< Manufacturing Specified Field
    CHAR8    BrandName[SOC_BRAND_NAME_SIZE]; ///< Null appended at end
  } SocConfiguration;

  #ifdef __cplusplus
  }
#endif

#endif // __SOC_CONFIGURATION_H__