summaryrefslogtreecommitdiff
path: root/Silicon/AMD/Styx/AmdModulePkg/Include/Protocol/AmdRasApeiProtocol.h
blob: 8a0346f2df84ac87a7a8047fbef0d884ee507093 (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
/* $NoKeywords: $ */
/**
 * @file
 *
 * AMD RAS APEI Protocol
 *
 * AMD Ras Interface Protocol GUID initialization
 *
 * @xrefitem bom "File Content Label" "Release Content"
 * @e project:      FDK
 * @e sub-project:  UEFI
 * @e \$Revision: 281924 $   @e \$Date: 2014-01-02 13:57:19 -0600 (Thu, 02 Jan 2014) $
 */
/*****************************************************************************
 *
 *  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 _AMD_RAS_APEI_PROTOCOL_H_
#define _AMD_RAS_APEI_PROTOCOL_H_

#include "AmdApei.h"

//
// GUID definition
//
#define AMD_RAS_APEI_PROTOCOL_GUID \
  { 0xe9dbcc60, 0x8f93, 0x47ed, 0x84, 0x78, 0x46, 0x78, 0xf1, 0x9f, 0x73, 0x4a }
// {E9DBCC60-8F93-47ed-8478-4678F19F734A}

extern EFI_GUID gAmdRasApeiProtocolGuid;

// current PPI revision
#define AMD_RAS_APEI_REV  0x01

/*----------------------------------------------------------------------------------------
 *           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
 *----------------------------------------------------------------------------------------
 */
typedef struct _AMD_RAS_APEI_PROTOCOL AMD_RAS_APEI_PROTOCOL;

/// APEI Interface data pointer
typedef
struct _AMD_APEI_INTERFACE {
  APEI_DRIVER_PRIVATE_DATA  *ApeiPrivData;
} AMD_APEI_INTERFACE;


/// APEI add Boot error record
typedef
EFI_STATUS
(EFIAPI *AMD_ADD_BOOT_ERROR_RECORD_ENTRY) (
  IN    UINT8   *ErrorRecord,
  IN    UINT32  RecordLen,
  IN    UINT8   ErrorType,
  IN    UINT8   SeverityType
);

/// APEI add HEST error source
typedef
EFI_STATUS
(EFIAPI *ADD_HEST_ERROR_SOURCE_ENTRY) (
  IN    UINT8   *pErrorRecord,
  IN    UINT32  RecordLen
);


/// RAS APEI Protocol Structure
typedef struct _AMD_RAS_APEI_PROTOCOL {
  AMD_APEI_INTERFACE               *AmdApeiInterface;        /// APEI Interface
  AMD_ADD_BOOT_ERROR_RECORD_ENTRY  AddBootErrorRecordEntry;  /// Boot error record to be added
  ADD_HEST_ERROR_SOURCE_ENTRY      AddHestErrorSourceEntry;  /// HEST error source to be added
} AMD_RAS_APEI_PROTOCOL;


#endif //_AMD_RAS_APEI_PROTOCOL_H_