2 System Firmware descriptor producer.
4 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #include <Library/PcdLib.h>
11 #include <Library/PeiServicesLib.h>
12 #include <Library/DebugLib.h>
13 #include <Protocol/FirmwareManagement.h>
14 #include <Guid/EdkiiSystemFmpCapsule.h>
17 Entrypoint for SystemFirmwareDescriptor PEIM.
19 @param[in] FileHandle Handle of the file being invoked.
20 @param[in] PeiServices Describes the list of possible PEI Services.
22 @retval EFI_SUCCESS PPI successfully installed.
26 SystemFirmwareDescriptorPeimEntry (
27 IN EFI_PEI_FILE_HANDLE FileHandle
,
28 IN CONST EFI_PEI_SERVICES
**PeiServices
32 EDKII_SYSTEM_FIRMWARE_IMAGE_DESCRIPTOR
*Descriptor
;
35 UINT32 AuthenticationStatus
;
38 // Search RAW section.
42 Status
= PeiServicesFfsFindSectionData3(EFI_SECTION_RAW
, Index
, FileHandle
, (VOID
**)&Descriptor
, &AuthenticationStatus
);
43 if (EFI_ERROR(Status
)) {
44 // Should not happen, must something wrong in FDF.
48 if (Descriptor
->Signature
== EDKII_SYSTEM_FIRMWARE_IMAGE_DESCRIPTOR_SIGNATURE
) {
54 DEBUG((DEBUG_INFO
, "EDKII_SYSTEM_FIRMWARE_IMAGE_DESCRIPTOR size - 0x%x\n", Descriptor
->Length
));
56 Size
= Descriptor
->Length
;
57 PcdSetPtrS (PcdEdkiiSystemFirmwareImageDescriptor
, &Size
, Descriptor
);