TianoCore EDK2 master
Loading...
Searching...
No Matches
FmpDependencyLib.c
Go to the documentation of this file.
1
10#include <PiDxe.h>
11#include <Library/BaseLib.h>
13#include <Library/DebugLib.h>
17#include <LastAttemptStatus.h>
19
20//
21// Define the initial size of the dependency expression evaluation stack
22//
23#define DEPEX_STACK_SIZE_INCREMENT 0x1000
24
25//
26// Type of stack element
27//
28typedef enum {
29 BooleanType,
30 VersionType
31} ELEMENT_TYPE;
32
33//
34// Value of stack element
35//
36typedef union {
37 BOOLEAN Boolean;
38 UINT32 Version;
40
41//
42// Stack element used to evaluate dependency expressions
43//
44typedef struct {
45 ELEMENT_VALUE Value;
46 ELEMENT_TYPE Type;
48
49//
50// Global stack used to evaluate dependency expressions
51//
52DEPEX_ELEMENT *mDepexEvaluationStack = NULL;
53DEPEX_ELEMENT *mDepexEvaluationStackEnd = NULL;
54DEPEX_ELEMENT *mDepexEvaluationStackPointer = NULL;
55
65 VOID
66 )
67{
68 DEPEX_ELEMENT *NewStack;
69 UINTN Size;
70
71 Size = DEPEX_STACK_SIZE_INCREMENT;
72 if (mDepexEvaluationStack != NULL) {
73 Size = Size + (mDepexEvaluationStackEnd - mDepexEvaluationStack);
74 }
75
76 NewStack = AllocatePool (Size * sizeof (DEPEX_ELEMENT));
77 if (NewStack == NULL) {
78 DEBUG ((DEBUG_ERROR, "GrowDepexStack: Cannot allocate memory for dependency evaluation stack!\n"));
79 return EFI_OUT_OF_RESOURCES;
80 }
81
82 if (mDepexEvaluationStack != NULL) {
83 //
84 // Copy to Old Stack to the New Stack
85 //
86 CopyMem (
87 NewStack,
88 mDepexEvaluationStack,
89 (mDepexEvaluationStackEnd - mDepexEvaluationStack) * sizeof (DEPEX_ELEMENT)
90 );
91
92 //
93 // Free The Old Stack
94 //
95 FreePool (mDepexEvaluationStack);
96 }
97
98 //
99 // Make the Stack pointer point to the old data in the new stack
100 //
101 mDepexEvaluationStackPointer = NewStack + (mDepexEvaluationStackPointer - mDepexEvaluationStack);
102 mDepexEvaluationStack = NewStack;
103 mDepexEvaluationStackEnd = NewStack + Size;
104
105 return EFI_SUCCESS;
106}
107
121 IN UINT32 Value,
122 IN UINTN Type
123 )
124{
125 EFI_STATUS Status;
126 DEPEX_ELEMENT Element;
127
128 //
129 // Check Type
130 //
131 if ((Type != BooleanType) && (Type != VersionType)) {
132 return EFI_INVALID_PARAMETER;
133 }
134
135 //
136 // Check for a stack overflow condition
137 //
138 if (mDepexEvaluationStackPointer == mDepexEvaluationStackEnd) {
139 //
140 // Grow the stack
141 //
142 Status = GrowDepexStack ();
143 if (EFI_ERROR (Status)) {
144 return Status;
145 }
146 }
147
148 Element.Value.Version = Value;
149 Element.Type = Type;
150
151 //
152 // Push the item onto the stack
153 //
154 *mDepexEvaluationStackPointer = Element;
155 mDepexEvaluationStackPointer++;
156
157 return EFI_SUCCESS;
158}
159
173 OUT DEPEX_ELEMENT *Element,
174 IN ELEMENT_TYPE Type
175 )
176{
177 //
178 // Check for a stack underflow condition
179 //
180 if (mDepexEvaluationStackPointer == mDepexEvaluationStack) {
181 DEBUG ((DEBUG_ERROR, "EvaluateDependency: Stack underflow!\n"));
182 return EFI_ACCESS_DENIED;
183 }
184
185 //
186 // Pop the item off the stack
187 //
188 mDepexEvaluationStackPointer--;
189 *Element = *mDepexEvaluationStackPointer;
190 if ((*Element).Type != Type) {
191 DEBUG ((DEBUG_ERROR, "EvaluateDependency: Popped element type is mismatched!\n"));
192 return EFI_INVALID_PARAMETER;
193 }
194
195 return EFI_SUCCESS;
196}
197
219BOOLEAN
220EFIAPI
222 IN EFI_FIRMWARE_IMAGE_DEP *Dependencies,
223 IN UINTN DependenciesSize,
224 IN FMP_DEPEX_CHECK_VERSION_DATA *FmpVersions OPTIONAL,
225 IN UINTN FmpVersionsCount,
226 OUT UINT32 *LastAttemptStatus OPTIONAL
227 )
228{
229 EFI_STATUS Status;
230 UINT8 *Iterator;
231 UINTN Index;
232 DEPEX_ELEMENT Element1;
233 DEPEX_ELEMENT Element2;
234 GUID ImageTypeId;
235 UINT32 Version;
236 UINT32 LocalLastAttemptStatus;
237 UINT32 DeclaredLength;
238
239 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_SUCCESS;
240
241 //
242 // Check if parameter is valid.
243 //
244 if ((Dependencies == NULL) || (DependenciesSize == 0)) {
245 return FALSE;
246 }
247
248 if ((FmpVersions == NULL) && (FmpVersionsCount > 0)) {
249 return FALSE;
250 }
251
252 //
253 // Clean out memory leaks in Depex Boolean stack. Leaks are only caused by
254 // incorrectly formed DEPEX expressions
255 //
256 mDepexEvaluationStackPointer = mDepexEvaluationStack;
257
258 Iterator = (UINT8 *)Dependencies->Dependencies;
259 while (Iterator < (UINT8 *)Dependencies->Dependencies + DependenciesSize) {
260 switch (*Iterator) {
262 if (Iterator + sizeof (EFI_GUID) >= (UINT8 *)Dependencies->Dependencies + DependenciesSize) {
263 DEBUG ((DEBUG_ERROR, "EvaluateDependency: GUID extends beyond end of dependency expression!\n"));
264 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_GUID_BEYOND_DEPEX;
265 goto Error;
266 }
267
268 CopyGuid (&ImageTypeId, (EFI_GUID *)(Iterator + 1));
269 Iterator = Iterator + sizeof (EFI_GUID);
270
271 for (Index = 0; Index < FmpVersionsCount; Index++) {
272 if (CompareGuid (&FmpVersions[Index].ImageTypeId, &ImageTypeId)) {
273 Status = Push (FmpVersions[Index].Version, VersionType);
274 if (EFI_ERROR (Status)) {
275 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_PUSH_FAILURE;
276 goto Error;
277 }
278
279 break;
280 }
281 }
282
283 if (Index == FmpVersionsCount) {
284 DEBUG ((DEBUG_ERROR, "EvaluateDependency: %g is not found!\n", &ImageTypeId));
285 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_FMP_NOT_FOUND;
286 goto Error;
287 }
288
289 break;
290 case EFI_FMP_DEP_PUSH_VERSION:
291 if (Iterator + sizeof (UINT32) >= (UINT8 *)Dependencies->Dependencies + DependenciesSize ) {
292 DEBUG ((DEBUG_ERROR, "EvaluateDependency: VERSION extends beyond end of dependency expression!\n"));
293 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_VERSION_BEYOND_DEPEX;
294 goto Error;
295 }
296
297 Version = *(UINT32 *)(Iterator + 1);
298 Status = Push (Version, VersionType);
299 if (EFI_ERROR (Status)) {
300 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_PUSH_FAILURE;
301 goto Error;
302 }
303
304 Iterator = Iterator + sizeof (UINT32);
305 break;
306 case EFI_FMP_DEP_VERSION_STR:
307 Iterator += AsciiStrnLenS ((CHAR8 *)Iterator, DependenciesSize - (Iterator - Dependencies->Dependencies));
308 if (Iterator == (UINT8 *)Dependencies->Dependencies + DependenciesSize) {
309 DEBUG ((DEBUG_ERROR, "EvaluateDependency: STRING extends beyond end of dependency expression!\n"));
310 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_VERSION_STR_BEYOND_DEPEX;
311 goto Error;
312 }
313
314 break;
315 case EFI_FMP_DEP_AND:
316 Status = Pop (&Element1, BooleanType);
317 if (EFI_ERROR (Status)) {
318 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_POP_FAILURE;
319 goto Error;
320 }
321
322 Status = Pop (&Element2, BooleanType);
323 if (EFI_ERROR (Status)) {
324 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_POP_FAILURE;
325 goto Error;
326 }
327
328 Status = Push (Element1.Value.Boolean & Element2.Value.Boolean, BooleanType);
329 if (EFI_ERROR (Status)) {
330 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_PUSH_FAILURE;
331 goto Error;
332 }
333
334 break;
335 case EFI_FMP_DEP_OR:
336 Status = Pop (&Element1, BooleanType);
337 if (EFI_ERROR (Status)) {
338 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_POP_FAILURE;
339 goto Error;
340 }
341
342 Status = Pop (&Element2, BooleanType);
343 if (EFI_ERROR (Status)) {
344 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_POP_FAILURE;
345 goto Error;
346 }
347
348 Status = Push (Element1.Value.Boolean | Element2.Value.Boolean, BooleanType);
349 if (EFI_ERROR (Status)) {
350 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_PUSH_FAILURE;
351 goto Error;
352 }
353
354 break;
355 case EFI_FMP_DEP_NOT:
356 Status = Pop (&Element1, BooleanType);
357 if (EFI_ERROR (Status)) {
358 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_POP_FAILURE;
359 goto Error;
360 }
361
362 Status = Push (!(Element1.Value.Boolean), BooleanType);
363 if (EFI_ERROR (Status)) {
364 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_PUSH_FAILURE;
365 goto Error;
366 }
367
368 break;
369 case EFI_FMP_DEP_TRUE:
370 Status = Push (TRUE, BooleanType);
371 if (EFI_ERROR (Status)) {
372 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_PUSH_FAILURE;
373 goto Error;
374 }
375
376 break;
377 case EFI_FMP_DEP_FALSE:
378 Status = Push (FALSE, BooleanType);
379 if (EFI_ERROR (Status)) {
380 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_PUSH_FAILURE;
381 goto Error;
382 }
383
384 break;
385 case EFI_FMP_DEP_EQ:
386 Status = Pop (&Element1, VersionType);
387 if (EFI_ERROR (Status)) {
388 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_POP_FAILURE;
389 goto Error;
390 }
391
392 Status = Pop (&Element2, VersionType);
393 if (EFI_ERROR (Status)) {
394 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_POP_FAILURE;
395 goto Error;
396 }
397
398 Status = (Element1.Value.Version == Element2.Value.Version) ? Push (TRUE, BooleanType) : Push (FALSE, BooleanType);
399 if (EFI_ERROR (Status)) {
400 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_PUSH_FAILURE;
401 goto Error;
402 }
403
404 break;
405 case EFI_FMP_DEP_GT:
406 Status = Pop (&Element1, VersionType);
407 if (EFI_ERROR (Status)) {
408 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_POP_FAILURE;
409 goto Error;
410 }
411
412 Status = Pop (&Element2, VersionType);
413 if (EFI_ERROR (Status)) {
414 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_POP_FAILURE;
415 goto Error;
416 }
417
418 Status = (Element1.Value.Version > Element2.Value.Version) ? Push (TRUE, BooleanType) : Push (FALSE, BooleanType);
419 if (EFI_ERROR (Status)) {
420 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_PUSH_FAILURE;
421 goto Error;
422 }
423
424 break;
425 case EFI_FMP_DEP_GTE:
426 Status = Pop (&Element1, VersionType);
427 if (EFI_ERROR (Status)) {
428 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_POP_FAILURE;
429 goto Error;
430 }
431
432 Status = Pop (&Element2, VersionType);
433 if (EFI_ERROR (Status)) {
434 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_POP_FAILURE;
435 goto Error;
436 }
437
438 Status = (Element1.Value.Version >= Element2.Value.Version) ? Push (TRUE, BooleanType) : Push (FALSE, BooleanType);
439 if (EFI_ERROR (Status)) {
440 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_PUSH_FAILURE;
441 goto Error;
442 }
443
444 break;
445 case EFI_FMP_DEP_LT:
446 Status = Pop (&Element1, VersionType);
447 if (EFI_ERROR (Status)) {
448 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_POP_FAILURE;
449 goto Error;
450 }
451
452 Status = Pop (&Element2, VersionType);
453 if (EFI_ERROR (Status)) {
454 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_POP_FAILURE;
455 goto Error;
456 }
457
458 Status = (Element1.Value.Version < Element2.Value.Version) ? Push (TRUE, BooleanType) : Push (FALSE, BooleanType);
459 if (EFI_ERROR (Status)) {
460 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_PUSH_FAILURE;
461 goto Error;
462 }
463
464 break;
465 case EFI_FMP_DEP_LTE:
466 Status = Pop (&Element1, VersionType);
467 if (EFI_ERROR (Status)) {
468 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_POP_FAILURE;
469 goto Error;
470 }
471
472 Status = Pop (&Element2, VersionType);
473 if (EFI_ERROR (Status)) {
474 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_POP_FAILURE;
475 goto Error;
476 }
477
478 Status = (Element1.Value.Version <= Element2.Value.Version) ? Push (TRUE, BooleanType) : Push (FALSE, BooleanType);
479 if (EFI_ERROR (Status)) {
480 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_PUSH_FAILURE;
481 goto Error;
482 }
483
484 break;
485 case EFI_FMP_DEP_END:
486 Status = Pop (&Element1, BooleanType);
487 if (EFI_ERROR (Status)) {
488 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_POP_FAILURE;
489 goto Error;
490 }
491
492 return Element1.Value.Boolean;
493 case EFI_FMP_DEP_DECLARE_LENGTH:
494 if (Iterator + sizeof (UINT32) >= (UINT8 *)Dependencies->Dependencies + DependenciesSize ) {
495 DEBUG ((DEBUG_ERROR, "EvaluateDependency: DECLARE_LENGTH extends beyond end of dependency expression!\n"));
496 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_DECLARE_LENGTH_BEYOND_DEPEX;
497 goto Error;
498 }
499
500 //
501 // This opcode must be the first one in a dependency expression.
502 //
503 if (Iterator != Dependencies->Dependencies) {
504 DEBUG ((DEBUG_ERROR, "EvaluateDependency: DECLARE_LENGTH is not the first opcode!\n"));
505 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_DECLARE_LENGTH_NOT_FIRST_OPCODE;
506 goto Error;
507 }
508
509 DeclaredLength = *(UINT32 *)(Iterator + 1);
510 if (DeclaredLength != DependenciesSize) {
511 DEBUG ((DEBUG_ERROR, "EvaluateDependency: DECLARE_LENGTH is not equal to length of dependency expression!\n"));
512 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_DECLARE_LENGTH_INCORRECT;
513 goto Error;
514 }
515
516 Status = Push (DeclaredLength, VersionType);
517 if (EFI_ERROR (Status)) {
518 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_PUSH_FAILURE;
519 goto Error;
520 }
521
522 Iterator = Iterator + sizeof (UINT32);
523 break;
524 default:
525 DEBUG ((DEBUG_ERROR, "EvaluateDependency: Unknown Opcode - %02x!\n", *Iterator));
526 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_UNKNOWN_OPCODE;
527 goto Error;
528 }
529
530 Iterator++;
531 }
532
533 DEBUG ((DEBUG_ERROR, "EvaluateDependency: No EFI_FMP_DEP_END Opcode in expression!\n"));
534 LocalLastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_NO_END_OPCODE;
535
536Error:
537 if (LastAttemptStatus != NULL) {
538 *LastAttemptStatus = LocalLastAttemptStatus;
539 }
540
541 return FALSE;
542}
543
559BOOLEAN
560EFIAPI
562 IN EFI_FIRMWARE_IMAGE_DEP *Dependencies,
563 IN UINTN MaxDepexSize,
564 OUT UINT32 *DepexSize,
565 OUT UINT32 *LastAttemptStatus OPTIONAL
566 )
567{
568 UINT8 *Depex;
569
570 if (DepexSize != NULL) {
571 *DepexSize = 0;
572 }
573
574 if (Dependencies == NULL) {
575 return FALSE;
576 }
577
578 Depex = Dependencies->Dependencies;
579 while (Depex < Dependencies->Dependencies + MaxDepexSize) {
580 switch (*Depex) {
582 Depex += sizeof (EFI_GUID) + 1;
583 break;
584 case EFI_FMP_DEP_PUSH_VERSION:
585 Depex += sizeof (UINT32) + 1;
586 break;
587 case EFI_FMP_DEP_VERSION_STR:
588 Depex += AsciiStrnLenS ((CHAR8 *)Depex, Dependencies->Dependencies + MaxDepexSize - Depex) + 1;
589 break;
590 case EFI_FMP_DEP_AND:
591 case EFI_FMP_DEP_OR:
592 case EFI_FMP_DEP_NOT:
593 case EFI_FMP_DEP_TRUE:
594 case EFI_FMP_DEP_FALSE:
595 case EFI_FMP_DEP_EQ:
596 case EFI_FMP_DEP_GT:
597 case EFI_FMP_DEP_GTE:
598 case EFI_FMP_DEP_LT:
599 case EFI_FMP_DEP_LTE:
600 Depex += 1;
601 break;
602 case EFI_FMP_DEP_END:
603 Depex += 1;
604 if (DepexSize != NULL) {
605 *DepexSize = (UINT32)(Depex - Dependencies->Dependencies);
606 }
607
608 return TRUE;
609 case EFI_FMP_DEP_DECLARE_LENGTH:
610 Depex += sizeof (UINT32) + 1;
611 break;
612 default:
613 return FALSE;
614 }
615 }
616
617 if (LastAttemptStatus != NULL) {
618 *LastAttemptStatus = LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_NO_END_OPCODE;
619 }
620
621 return FALSE;
622}
623
639EFIAPI
642 IN UINTN ImageSize,
643 OUT UINT32 *DepexSize,
644 OUT UINT32 *LastAttemptStatus OPTIONAL
645 )
646{
648 UINTN MaxDepexSize;
649
650 if (Image == NULL) {
651 return NULL;
652 }
653
654 //
655 // Check to make sure that operation can be safely performed.
656 //
657 if ((((UINTN)Image + sizeof (Image->MonotonicCount) + Image->AuthInfo.Hdr.dwLength) < (UINTN)Image) || \
658 (((UINTN)Image + sizeof (Image->MonotonicCount) + Image->AuthInfo.Hdr.dwLength) >= (UINTN)Image + ImageSize))
659 {
660 //
661 // Pointer overflow. Invalid image.
662 //
663 if (LastAttemptStatus != NULL) {
665 }
666
667 return NULL;
668 }
669
670 Depex = (EFI_FIRMWARE_IMAGE_DEP *)((UINT8 *)Image + sizeof (Image->MonotonicCount) + Image->AuthInfo.Hdr.dwLength);
671 MaxDepexSize = ImageSize - (sizeof (Image->MonotonicCount) + Image->AuthInfo.Hdr.dwLength);
672
673 //
674 // Validate the dependency and get the size of dependency
675 //
676 if (ValidateDependency (Depex, MaxDepexSize, DepexSize, LastAttemptStatus)) {
677 return Depex;
678 }
679
680 return NULL;
681}
UINT64 UINTN
UINTN EFIAPI AsciiStrnLenS(IN CONST CHAR8 *String, IN UINTN MaxSize)
Definition: SafeString.c:1696
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
Definition: MemLibGuid.c:73
GUID *EFIAPI CopyGuid(OUT GUID *DestinationGuid, IN CONST GUID *SourceGuid)
Definition: MemLibGuid.c:39
VOID EFIAPI FreePool(IN VOID *Buffer)
#define EFI_FMP_DEP_PUSH_GUID
EFI_STATUS Push(IN UINT32 Value, IN UINTN Type)
EFI_STATUS GrowDepexStack(VOID)
BOOLEAN EFIAPI EvaluateDependency(IN EFI_FIRMWARE_IMAGE_DEP *Dependencies, IN UINTN DependenciesSize, IN FMP_DEPEX_CHECK_VERSION_DATA *FmpVersions OPTIONAL, IN UINTN FmpVersionsCount, OUT UINT32 *LastAttemptStatus OPTIONAL)
BOOLEAN EFIAPI ValidateDependency(IN EFI_FIRMWARE_IMAGE_DEP *Dependencies, IN UINTN MaxDepexSize, OUT UINT32 *DepexSize, OUT UINT32 *LastAttemptStatus OPTIONAL)
EFI_FIRMWARE_IMAGE_DEP *EFIAPI GetImageDependency(IN EFI_FIRMWARE_IMAGE_AUTHENTICATION *Image, IN UINTN ImageSize, OUT UINT32 *DepexSize, OUT UINT32 *LastAttemptStatus OPTIONAL)
EFI_STATUS Pop(OUT DEPEX_ELEMENT *Element, IN ELEMENT_TYPE Type)
@ LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_GET_DEPEX_FAILURE
#define NULL
Definition: Base.h:319
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define DEBUG(Expression)
Definition: DebugLib.h:434
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
#define LAST_ATTEMPT_STATUS_SUCCESS
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
GUID EFI_GUID
Definition: UefiBaseType.h:25
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
Definition: Base.h:213