hc
2024-03-25 edb30157bad0c0001c32b854271ace01d3b9a16a
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
/* $NoKeywords */
/**
 * @file
 *
 * IscpPpi.h
 *
 * Contains Intra-SoC Communication Protocol-Protocol Interface 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.
*
***************************************************************************/
 
 
#ifndef _PEI_ISCP_PPI_H_
#define _PEI_ISCP_PPI_H_
 
/*----------------------------------------------------------------------------------------
 *                             M O D U L E S    U S E D
 *----------------------------------------------------------------------------------------
 */
#include <Iscp.h>
 
 
/*----------------------------------------------------------------------------------------
 *                   D E F I N I T I O N S    A N D    M A C R O S
 *----------------------------------------------------------------------------------------
 */
#define PEI_ISCP_PPI_GUID {\
  0xca2c1ecd, 0xc702, 0x49b1, { 0xae, 0x24, 0x9b, 0x6f, 0xa8, 0x71, 0x3b, 0x23 } \
}
 
 
/*----------------------------------------------------------------------------------------
 *                  T Y P E D E F S     A N D     S T R U C T U R E S
 *----------------------------------------------------------------------------------------
 */
typedef struct _EFI_PEI_ISCP_PPI EFI_PEI_ISCP_PPI;
 
 
/// ISCP Memory Transaction
typedef
EFI_STATUS
(EFIAPI *PEI_ISCP_MEMORY_TRANSACTION)(
  IN     CONST EFI_PEI_SERVICES             **PeiServices,        ///< Pointer to the PEI Services Table
  IN OUT AMD_MEMORY_RANGE_DESCRIPTOR  *MemRangeDescriptor   ///< Pointer to Memory Range Descriptor
  );
 
 
/// ISCP Fuse Transaction
typedef
EFI_STATUS
(EFIAPI *PEI_ISCP_FUSE_TRANSACTION)(
  IN CONST EFI_PEI_SERVICES     **PeiServices,  ///< Pointer to the PEI Services Table
  IN OUT   ISCP_FUSE_INFO       *FuseInfo       ///< Pointer to the Fuse Info structure
  );
 
 
/// ISCP CPU Retrieve ID Transaction
typedef
EFI_STATUS
(EFIAPI *PEI_ISCP_CPU_RETRIEVE_ID_TRANSACTION)(
  IN CONST  EFI_PEI_SERVICES     **PeiServices,    ///< Pointer to the PEI Services Table
  IN OUT    ISCP_CPU_RESET_INFO  *CpuResetInfo     ///< Pointer to CPU Reset Info structure
  );
 
 
/// ISCP CPU Reset transaction
typedef
EFI_STATUS
(EFIAPI *PEI_ISCP_CPU_RESET_TRANSACTION)(
  IN CONST EFI_PEI_SERVICES     **PeiServices,    ///< Pointer to the PEI Services Table
  IN OUT   ISCP_CPU_RESET_INFO  *CpuResetInfo     ///< Pointer to CPU Reset Info structure
  );
 
 
/// ISCP Get Real-Time-Clock Transaction
typedef
EFI_STATUS
(EFIAPI *PEI_ISCP_GET_RTC_TRANSACTION)(
  IN CONST EFI_PEI_SERVICES           **PeiServices,   ///< Pointer to the PEI Services Table
  IN OUT   ISCP_RTC_INFO              *RtcInfo         ///< Pointer to the Real-Time-Clock
  );
 
 
/// ISCP Set Real-Time-Clock Transaction
typedef
EFI_STATUS
(EFIAPI *PEI_ISCP_SET_RTC_TRANSACTION)(
  IN CONST EFI_PEI_SERVICES           **PeiServices,  ///< Pointer to the PEI Services Table
  IN OUT   ISCP_RTC_INFO              *RtcInfo        ///< Pointer to the Real-Time-Clock
  );
 
 
/// ISCP Get MAC Address Transaction
typedef
EFI_STATUS
(EFIAPI *PEI_ISCP_GET_MAC_ADDRESS_TRANSACTION)(
  IN CONST EFI_PEI_SERVICES           **PeiServices,  ///< Pointer to the PEI Services Table
  IN OUT   ISCP_MAC_INFO              *MacInfo        ///< Pointer to the MAC Address info
  );
 
 
/// ISCP Set MAC Address Transaction
typedef
EFI_STATUS
(EFIAPI *PEI_ISCP_SET_MAC_ADDRESS_TRANSACTION)(
  IN CONST EFI_PEI_SERVICES           **PeiServices,  ///< Pointer to the PEI Services Table
  IN OUT   ISCP_MAC_INFO              *MacInfo        ///< Pointer to the MAC Address info
  );
 
 
/// ISCP Update Firmware Volume Block Transaction
typedef
EFI_STATUS
(EFIAPI *PEI_ISCP_UPDATE_FV_BLOCK_TRANSACTION)(
  IN CONST  EFI_PEI_SERVICES         **PeiServices,  ///< Pointer to the PEI Services Table
  IN CONST  UINT32                   Offset,         ///< Offset from base of FV Block
  IN OUT    UINT8                    *NvData,        ///< Pointer to the NV data being stored
  IN CONST  UINT32                   NvSize          ///< Size of NV Data being stored
  );
 
 
/// SCP Load Firmware Volume Block Transaction
typedef
EFI_STATUS
(EFIAPI *PEI_ISCP_LOAD_FV_BLOCK_TRANSACTION)(
  IN CONST  EFI_PEI_SERVICES         **PeiServices,   ///< Pointer to the PEI Services Table
  IN CONST  UINT32                   Offset,          ///< Offset from base of FV Block
  IN OUT    UINT8                    *NvData,         ///< Pointer to the NV data being stored
  IN CONST  UINT32                   NvSize           ///< Size of NV Data being stored
  );
 
 
/// ISCP Erase Firmware Volume Block Transaction
typedef
EFI_STATUS
(EFIAPI *PEI_ISCP_ERASE_FV_BLOCK_TRANSACTION)(
  IN CONST  EFI_PEI_SERVICES         **PeiServices,  ///< Pointer to the PEI Services Table
  IN CONST  UINT32                   Offset,         ///< Offset from base of FV Block
  IN CONST  UINT32                   NvSize          ///< Size of NV Data being stored
  );
 
 
/// ISCP PCIE Reset Transaction
typedef
EFI_STATUS
(EFIAPI *PEI_ISCP_PCIE_RESET_TRANSACTION)(
  IN CONST  EFI_PEI_SERVICES          **PeiServices,  ///< Pointer to the PEI Services Table
  IN OUT    ISCP_PCIE_RESET_INFO      *PcieResetInfo  ///< Pointer to PCIE Reset info structure
  );
 
 
/// ISCP Send UART Config Transaction
typedef
EFI_STATUS
(EFIAPI *PEI_ISCP_SEND_UART_CONFIG_TRANSACTION)(
  IN CONST  EFI_PEI_SERVICES          **PeiServices,  ///< Pointer to the PEI Services Table
  IN OUT    ISCP_UART_INFO            *UartInfo       ///< Pointer to UART Config info structure
  );
 
/// ISCP Sata1 get Transaction
typedef
EFI_STATUS
(EFIAPI *PEI_ISCP_SATA1_GET_TRANSACTION)(
  IN CONST  EFI_PEI_SERVICES          **PeiServices,  ///< Pointer to the PEI Services Table
  IN OUT    ISCP_SATA1_RESET_INFO     *Sata1ResetInfo ///< Pointer to SATA1 reset structure
  );
 
/// ISCP BMC Present
typedef
EFI_STATUS
(EFIAPI *PEI_ISCP_BMC_PRESENT_TRANSACTION)(
  IN CONST  EFI_PEI_SERVICES          **PeiServices,   ///< Pointer to the PEI Services Table
  OUT       ISCP_BMC_PRESENCE_INFO    *BmcPresenceInfo ///< Pointer to BMC presence structure
  );
 
/// This PPI provides several services in PEI to work with the underlying
/// Intra-SOC Communication Protocol capabilities of the platform.  These
/// services include the ability for PEI to send/receive Firmware Setup data,
/// retrieve memory data, retrieve fuse data, perform CPU core reset, e.g launch,
/// retrieve OEM NVRAM transactions.
struct _EFI_PEI_ISCP_PPI {
  PEI_ISCP_MEMORY_TRANSACTION           ExecuteMemoryTransaction;
  PEI_ISCP_FUSE_TRANSACTION             ExecuteFuseTransaction;
  PEI_ISCP_CPU_RETRIEVE_ID_TRANSACTION  ExecuteCpuRetrieveIdTransaction;
  PEI_ISCP_CPU_RESET_TRANSACTION        ExecuteCpuResetTransaction;
  PEI_ISCP_GET_RTC_TRANSACTION          ExecuteGetRtcTransaction;
  PEI_ISCP_SET_RTC_TRANSACTION          ExecuteSetRtcTransaction;
  PEI_ISCP_GET_MAC_ADDRESS_TRANSACTION  ExecuteGetMacAddressTransaction;
  PEI_ISCP_SET_MAC_ADDRESS_TRANSACTION  ExecuteSetMacAddressTransaction;
  PEI_ISCP_UPDATE_FV_BLOCK_TRANSACTION  ExecuteUpdateFvBlock;
  PEI_ISCP_LOAD_FV_BLOCK_TRANSACTION    ExecuteLoadNvBlock;
  PEI_ISCP_ERASE_FV_BLOCK_TRANSACTION   ExecuteEraseNvBlock;
  PEI_ISCP_PCIE_RESET_TRANSACTION       ExecutePcieResetTransaction;
  PEI_ISCP_SEND_UART_CONFIG_TRANSACTION ExecuteSendUartConfigTransaction;
  PEI_ISCP_SATA1_GET_TRANSACTION        ExecuteSata1GetTransaction;
  PEI_ISCP_BMC_PRESENT_TRANSACTION      ExecuteBmcPresentTransaction;
};
 
extern EFI_GUID gPeiIscpPpiGuid;
 
#endif // #ifndef _PEI_ISCP_PPI_H_