2 System Firmware descriptor producer.
4 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #include <Library/PcdLib.h>
17 #include <Library/PeiServicesLib.h>
18 #include <Library/DebugLib.h>
19 #include <Protocol/FirmwareManagement.h>
20 #include <Guid/EdkiiSystemFmpCapsule.h>
23 Entrypoint for SystemFirmwareDescriptor PEIM.
25 @param[in] FileHandle Handle of the file being invoked.
26 @param[in] PeiServices Describes the list of possible PEI Services.
28 @retval EFI_SUCCESS PPI successfully installed.
32 SystemFirmwareDescriptorPeimEntry (
33 IN EFI_PEI_FILE_HANDLE FileHandle
,
34 IN CONST EFI_PEI_SERVICES
**PeiServices
38 EDKII_SYSTEM_FIRMWARE_IMAGE_DESCRIPTOR
*Descriptor
;
41 UINT32 AuthenticationStatus
;
44 // Search RAW section.
48 Status
= PeiServicesFfsFindSectionData3(EFI_SECTION_RAW
, Index
, FileHandle
, (VOID
**)&Descriptor
, &AuthenticationStatus
);
49 if (EFI_ERROR(Status
)) {
50 // Should not happen, must something wrong in FDF.
54 if (Descriptor
->Signature
== EDKII_SYSTEM_FIRMWARE_IMAGE_DESCRIPTOR_SIGNATURE
) {
60 DEBUG((DEBUG_INFO
, "EDKII_SYSTEM_FIRMWARE_IMAGE_DESCRIPTOR size - 0x%x\n", Descriptor
->Length
));
62 Size
= Descriptor
->Length
;
63 PcdSetPtrS (PcdEdkiiSystemFirmwareImageDescriptor
, &Size
, Descriptor
);