]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Guid/SystemResourceTable.h
MdePkg: TpmPtp: Add CapCRBIdleBypass definition
[mirror_edk2.git] / MdePkg / Include / Guid / SystemResourceTable.h
CommitLineData
2ca32f8d
HW
1/** @file\r
2 Guid & data structure used for EFI System Resource Table (ESRT)\r
3\r
4 Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
5 This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13 @par Revision Reference:\r
14 GUIDs defined in UEFI 2.5 spec.\r
15\r
16**/\r
17\r
18\r
19#ifndef _SYSTEM_RESOURCE_TABLE_H__\r
20#define _SYSTEM_RESOURCE_TABLE_H__\r
21\r
22#define EFI_SYSTEM_RESOURCE_TABLE_GUID \\r
23 { \\r
24 0xb122a263, 0x3661, 0x4f68, {0x99, 0x29, 0x78, 0xf8, 0xb0, 0xd6, 0x21, 0x80 } \\r
25 }\r
26\r
27///\r
28/// Current Entry Version\r
29///\r
30#define EFI_SYSTEM_RESOURCE_TABLE_FIRMWARE_RESOURCE_VERSION 1\r
31\r
32///\r
33/// Firmware Type Definitions\r
34///\r
35#define ESRT_FW_TYPE_UNKNOWN 0x00000000\r
36#define ESRT_FW_TYPE_SYSTEMFIRMWARE 0x00000001\r
37#define ESRT_FW_TYPE_DEVICEFIRMWARE 0x00000002\r
38#define ESRT_FW_TYPE_UEFIDRIVER 0x00000003\r
39\r
40///\r
41/// Last Attempt Status Values\r
42///\r
43#define LAST_ATTEMPT_STATUS_SUCCESS 0x00000000\r
44#define LAST_ATTEMPT_STATUS_ERROR_UNSUCCESSFUL 0x00000001\r
45#define LAST_ATTEMPT_STATUS_ERROR_INSUFFICIENT_RESOURCES 0x00000002\r
46#define LAST_ATTEMPT_STATUS_ERROR_INCORRECT_VERSION 0x00000003\r
47#define LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT 0x00000004\r
48#define LAST_ATTEMPT_STATUS_ERROR_AUTH_ERROR 0x00000005\r
49#define LAST_ATTEMPT_STATUS_ERROR_PWR_EVT_AC 0x00000006\r
50#define LAST_ATTEMPT_STATUS_ERROR_PWR_EVT_BATT 0x00000007\r
51\r
52typedef struct {\r
53 ///\r
54 /// The firmware class field contains a GUID that identifies a firmware component\r
55 /// that can be updated via UpdateCapsule(). This GUID must be unique within all\r
56 /// entries of the ESRT.\r
57 ///\r
58 EFI_GUID FwClass;\r
59 ///\r
60 /// Identifies the type of firmware resource.\r
61 ///\r
62 UINT32 FwType;\r
63 ///\r
64 /// The firmware version field represents the current version of the firmware\r
65 /// resource, value must always increase as a larger number represents a newer\r
66 /// version.\r
67 ///\r
68 UINT32 FwVersion;\r
69 ///\r
70 /// The lowest firmware resource version to which a firmware resource can be\r
71 /// rolled back for the given system/device. Generally this is used to protect\r
72 /// against known and fixed security issues.\r
73 ///\r
74 UINT32 LowestSupportedFwVersion;\r
75 ///\r
76 /// The capsule flags field contains the CapsuleGuid flags (bits 0- 15) as defined\r
77 /// in the EFI_CAPSULE_HEADER that will be set in the capsule header.\r
78 ///\r
79 UINT32 CapsuleFlags;\r
80 ///\r
81 /// The last attempt version field describes the last firmware version for which\r
82 /// an update was attempted (uses the same format as Firmware Version).\r
83 /// Last Attempt Version is updated each time an UpdateCapsule() is attempted for\r
84 /// an ESRT entry and is preserved across reboots (non-volatile). However, in\r
85 /// cases where the attempt version is not recorded due to limitations in the\r
86 /// update process, the field shall set to zero after a failed update. Similarly,\r
87 /// in the case of a removable device, this value is set to 0 in cases where the\r
88 /// device has not been updated since being added to the system.\r
89 ///\r
90 UINT32 LastAttemptVersion;\r
91 ///\r
92 /// The last attempt status field describes the result of the last firmware update\r
93 /// attempt for the firmware resource entry.\r
94 /// LastAttemptStatus is updated each time an UpdateCapsule() is attempted for an\r
95 /// ESRT entry and is preserved across reboots (non-volatile).\r
96 /// If a firmware update has never been attempted or is unknown, for example after\r
97 /// fresh insertion of a removable device, LastAttemptStatus must be set to Success.\r
98 ///\r
99 UINT32 LastAttemptStatus;\r
100} EFI_SYSTEM_RESOURCE_ENTRY;\r
101\r
102typedef struct {\r
103 ///\r
104 /// The number of firmware resources in the table, must not be zero.\r
105 ///\r
106 UINT32 FwResourceCount;\r
107 ///\r
108 /// The maximum number of resource array entries that can be within the table\r
109 /// without reallocating the table, must not be zero.\r
110 ///\r
111 UINT32 FwResourceCountMax;\r
112 ///\r
113 /// The version of the EFI_SYSTEM_RESOURCE_ENTRY entities used in this table.\r
114 /// This field should be set to 1.\r
115 ///\r
116 UINT64 FwResourceVersion;\r
117 ///\r
118 /// Array of EFI_SYSTEM_RESOURCE_ENTRY\r
119 ///\r
120 //EFI_SYSTEM_RESOURCE_ENTRY Entries[];\r
121} EFI_SYSTEM_RESOURCE_TABLE;\r
122\r
123extern EFI_GUID gEfiSystemResourceTableGuid;\r
124\r
125#endif\r