1 /*++
2 
3   Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.<BR>
4 
5 
6   This program and the accompanying materials are licensed and made available under
7 
8   the terms and conditions of the BSD License that accompanies this distribution.
9 
10   The full text of the license may be found at
11 
12   http://opensource.org/licenses/bsd-license.php.
13 
14 
15 
16   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
17 
18   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 
20 
21 
22 
23 
24 Module Name:
25 
26  Esrt.h
27 
28 Abstract:
29 
30 --*/
31 
32 #ifndef _DFU_ESRT_H_
33 #define _DFU_ESRT_H_
34 
35 typedef struct {
36   EFI_GUID         FwClass;
37   UINT32           FwType;
38   UINT32           FwVersion;
39   UINT32           FwLstCompatVersion;
40   UINT32           CapsuleFlags;
41   UINT32           LastAttemptVersion;
42   UINT32           LastAttemptStatus;
43 } FW_RES_ENTRY;
44 
45 typedef struct {
46   UINT32           NumEntries;
47   FW_RES_ENTRY     FwEntries[256];
48 } FW_RES_ENTRY_LIST;
49 
50 
51 typedef struct {
52   UINT32          FwResourceCount;
53   UINT32          FwResourceMax;
54   UINT64          FwResourceVersion;
55 } EFI_SYSTEM_RESOURCE_TABLE;
56 
57 
58 typedef
59 EFI_STATUS
60 (EFIAPI *ESRT_POPULATE_TABLE) (
61 );
62 
63 typedef
64 EFI_STATUS
65 (EFIAPI *ESRT_UPDATE_TABLE_ENTRY_BY_GUID) (
66 	IN EFI_GUID FwEntryGuid,
67 	IN FW_RES_ENTRY *FwEntry
68 );
69 
70 typedef
71 EFI_STATUS
72 (EFIAPI *ESRT_GET_FW_ENTRY_BY_GUID) (
73     IN EFI_GUID FwEntryGuid,
74 	OUT FW_RES_ENTRY *FwEntry
75 );
76 
77 
78 #pragma pack()
79 
80 typedef struct _ESRT_OPERATION_PROTOCOL {
81    ESRT_POPULATE_TABLE					EsrtPopulateTable;
82    ESRT_UPDATE_TABLE_ENTRY_BY_GUID		EsrtUpdateTableEntryByGuid;
83    ESRT_GET_FW_ENTRY_BY_GUID			EsrtGetFwEntryByGuid;
84 } ESRT_OPERATION_PROTOCOL;
85 
86 extern EFI_GUID gEfiEsrtOperationProtocolGuid;
87 
88 #endif
89