TianoCore EDK2 master
Loading...
Searching...
No Matches
Bis.h
Go to the documentation of this file.
1
13#ifndef __BIS_H__
14#define __BIS_H__
15
16#define EFI_BIS_PROTOCOL_GUID \
17 { \
18 0x0b64aab0, 0x5429, 0x11d4, {0x98, 0x16, 0x00, 0xa0, 0xc9, 0x1f, 0xad, 0xcf } \
19 }
20
21//
22// X-Intel-BIS-ParameterSet
23// Attribute value
24// Binary Value of X-Intel-BIS-ParameterSet Attribute.
25// (Value is Base-64 encoded in actual signed manifest).
26//
27#define BOOT_OBJECT_AUTHORIZATION_PARMSET_GUID \
28 { \
29 0xedd35e31, 0x7b9, 0x11d2, { 0x83,0xa3,0x0,0xa0,0xc9,0x1f,0xad,0xcf } \
30 }
31
33
34//
35// Basic types
36//
37typedef VOID *BIS_APPLICATION_HANDLE;
38typedef UINT16 BIS_ALG_ID;
39typedef UINT32 BIS_CERT_ID;
40
44typedef struct {
45 UINT32 Length;
46 UINT8 *Data;
48
52typedef struct {
53 UINT32 Major;
54 UINT32 Minor;
56
57//
58// ----------------------------------------------------//
59// Use these values to initialize EFI_BIS_VERSION.Major
60// and to interpret results of Initialize.
61// ----------------------------------------------------//
62//
63#define BIS_CURRENT_VERSION_MAJOR BIS_VERSION_1
64#define BIS_VERSION_1 1
65
69typedef struct {
70 BIS_CERT_ID CertificateID;
71 BIS_ALG_ID AlgorithmID;
72 UINT16 KeyLength;
74
80#define BIS_ALG_DSA (41) // CSSM_ALGID_DSA
81#define BIS_ALG_RSA_MD5 (42) // CSSM_ALGID_MD5_WITH_RSA
85#define BIS_CERT_ID_DSA BIS_ALG_DSA // CSSM_ALGID_DSA
86#define BIS_CERT_ID_RSA_MD5 BIS_ALG_RSA_MD5 // CSSM_ALGID_MD5_WITH_RSA
93#define BIS_CERT_ID_MASK (0xFF7F7FFF)
94
102#define BIS_GET_SIGINFO_COUNT(BisDataPtr) ((BisDataPtr)->Length / sizeof (EFI_BIS_SIGNATURE_INFO))
103
108#define BIS_GET_SIGINFO_ARRAY(BisDataPtr) ((EFI_BIS_SIGNATURE_INFO *) (BisDataPtr)->Data)
109
113#define BOOT_OBJECT_AUTHORIZATION_PARMSET_GUIDVALUE \
114 BOOT_OBJECT_AUTHORIZATION_PARMSET_GUID
115
157typedef
159(EFIAPI *EFI_BIS_INITIALIZE)(
160 IN EFI_BIS_PROTOCOL *This,
161 OUT BIS_APPLICATION_HANDLE *AppHandle,
162 IN OUT EFI_BIS_VERSION *InterfaceVersion,
163 IN EFI_BIS_DATA *TargetAddress
164 );
165
182typedef
184(EFIAPI *EFI_BIS_FREE)(
185 IN BIS_APPLICATION_HANDLE AppHandle,
186 IN EFI_BIS_DATA *ToFree
187 );
188
204typedef
206(EFIAPI *EFI_BIS_SHUTDOWN)(
207 IN BIS_APPLICATION_HANDLE AppHandle
208 );
209
229typedef
232 IN BIS_APPLICATION_HANDLE AppHandle,
233 OUT EFI_BIS_DATA **Certificate
234 );
235
258typedef
261 IN BIS_APPLICATION_HANDLE AppHandle,
262 IN EFI_BIS_DATA *Credentials,
263 IN EFI_BIS_DATA *DataObject,
264 OUT BOOLEAN *IsVerified
265 );
266
284typedef
287 IN BIS_APPLICATION_HANDLE AppHandle,
288 OUT BOOLEAN *CheckIsRequired
289 );
290
311typedef
314 IN BIS_APPLICATION_HANDLE AppHandle,
315 OUT EFI_BIS_DATA **UpdateToken
316 );
317
343typedef
346 IN BIS_APPLICATION_HANDLE AppHandle,
347 IN EFI_BIS_DATA *RequestCredential,
348 OUT EFI_BIS_DATA **NewUpdateToken
349 );
350
381typedef
384 IN BIS_APPLICATION_HANDLE AppHandle,
385 IN EFI_BIS_DATA *Credentials,
386 IN EFI_BIS_DATA *DataObject,
387 IN EFI_BIS_DATA *SectionName,
388 IN EFI_BIS_DATA *AuthorityCertificate,
389 OUT BOOLEAN *IsVerified
390 );
391
415typedef
418 IN BIS_APPLICATION_HANDLE AppHandle,
419 OUT EFI_BIS_DATA **SignatureInfo
420 );
421
427 EFI_BIS_INITIALIZE Initialize;
428 EFI_BIS_SHUTDOWN Shutdown;
429 EFI_BIS_FREE Free;
430 EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CERTIFICATE GetBootObjectAuthorizationCertificate;
431 EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CHECKFLAG GetBootObjectAuthorizationCheckFlag;
432 EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_UPDATE_TOKEN GetBootObjectAuthorizationUpdateToken;
433 EFI_BIS_GET_SIGNATURE_INFO GetSignatureInfo;
434 EFI_BIS_UPDATE_BOOT_OBJECT_AUTHORIZATION UpdateBootObjectAuthorization;
435 EFI_BIS_VERIFY_BOOT_OBJECT VerifyBootObject;
436 EFI_BIS_VERIFY_OBJECT_WITH_CREDENTIAL VerifyObjectWithCredential;
437};
438
439extern EFI_GUID gEfiBisProtocolGuid;
440extern EFI_GUID gBootObjectAuthorizationParmsetGuid;
441
442#endif
EFI_STATUS(EFIAPI * EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CERTIFICATE)(IN BIS_APPLICATION_HANDLE AppHandle, OUT EFI_BIS_DATA **Certificate)
Definition: Bis.h:231
EFI_STATUS(EFIAPI * EFI_BIS_UPDATE_BOOT_OBJECT_AUTHORIZATION)(IN BIS_APPLICATION_HANDLE AppHandle, IN EFI_BIS_DATA *RequestCredential, OUT EFI_BIS_DATA **NewUpdateToken)
Definition: Bis.h:345
EFI_STATUS(EFIAPI * EFI_BIS_INITIALIZE)(IN EFI_BIS_PROTOCOL *This, OUT BIS_APPLICATION_HANDLE *AppHandle, IN OUT EFI_BIS_VERSION *InterfaceVersion, IN EFI_BIS_DATA *TargetAddress)
Definition: Bis.h:159
EFI_STATUS(EFIAPI * EFI_BIS_FREE)(IN BIS_APPLICATION_HANDLE AppHandle, IN EFI_BIS_DATA *ToFree)
Definition: Bis.h:184
EFI_STATUS(EFIAPI * EFI_BIS_VERIFY_BOOT_OBJECT)(IN BIS_APPLICATION_HANDLE AppHandle, IN EFI_BIS_DATA *Credentials, IN EFI_BIS_DATA *DataObject, OUT BOOLEAN *IsVerified)
Definition: Bis.h:260
EFI_STATUS(EFIAPI * EFI_BIS_SHUTDOWN)(IN BIS_APPLICATION_HANDLE AppHandle)
Definition: Bis.h:206
EFI_STATUS(EFIAPI * EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_UPDATE_TOKEN)(IN BIS_APPLICATION_HANDLE AppHandle, OUT EFI_BIS_DATA **UpdateToken)
Definition: Bis.h:313
EFI_STATUS(EFIAPI * EFI_BIS_GET_SIGNATURE_INFO)(IN BIS_APPLICATION_HANDLE AppHandle, OUT EFI_BIS_DATA **SignatureInfo)
Definition: Bis.h:417
EFI_STATUS(EFIAPI * EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CHECKFLAG)(IN BIS_APPLICATION_HANDLE AppHandle, OUT BOOLEAN *CheckIsRequired)
Definition: Bis.h:286
EFI_STATUS(EFIAPI * EFI_BIS_VERIFY_OBJECT_WITH_CREDENTIAL)(IN BIS_APPLICATION_HANDLE AppHandle, IN EFI_BIS_DATA *Credentials, IN EFI_BIS_DATA *DataObject, IN EFI_BIS_DATA *SectionName, IN EFI_BIS_DATA *AuthorityCertificate, OUT BOOLEAN *IsVerified)
Definition: Bis.h:383
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
UINT32 Length
The length of Data in 8 bit bytes.
Definition: Bis.h:45
UINT8 * Data
32 Bit Flat Address of data.
Definition: Bis.h:46
BIS_ALG_ID AlgorithmID
A signature algorithm number.
Definition: Bis.h:71
UINT16 KeyLength
The length of alg. keys in bits.
Definition: Bis.h:72
BIS_CERT_ID CertificateID
Truncated hash of platform Boot Object.
Definition: Bis.h:70
UINT32 Major
The major BIS version number.
Definition: Bis.h:53
UINT32 Minor
A minor BIS version number.
Definition: Bis.h:54
Definition: Base.h:213