X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FSectionExtractionPei%2FSectionExtractionPei.c;h=97e321d551de2e822f1a0153a53514d3c031f974;hb=d1102dba7210b95e41d06c2338a22ba6af248645;hp=63fc94cb5146232839efbe20670088487f7fb1d4;hpb=ca79bab7af4770c5eb578f6d495af01705aedb79;p=mirror_edk2.git diff --git a/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPei.c b/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPei.c index 63fc94cb51..97e321d551 100644 --- a/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPei.c +++ b/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPei.c @@ -2,13 +2,13 @@ Section Extraction PEIM Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -50,7 +50,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. output buffer. If the input section's GuidedSectionHeader. Attributes field has the - EFI_GUIDED_SECTION_AUTH_STATUS_VALID + EFI_GUIDED_SECTION_AUTH_STATUS_VALID bit as clear, AuthenticationStatus must return zero. These bits reflect the @@ -60,14 +60,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. EFI_SUCCESS, the value of AuthenticationStatus is undefined. - + @retval EFI_SUCCESS The InputSection was successfully processed and the section contents were returned. - + @retval EFI_OUT_OF_RESOURCES The system has insufficient resources to process the request. - + @retval EFI_INVALID_PARAMETER The GUID in InputSection does not match this instance of the GUIDed Section Extraction PPI. @@ -121,7 +121,7 @@ CONST EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI mCustomGuidedSectionExtractionPpi = output buffer. If the input section's GuidedSectionHeader. Attributes field has the - EFI_GUIDED_SECTION_AUTH_STATUS_VALID + EFI_GUIDED_SECTION_AUTH_STATUS_VALID bit as clear, AuthenticationStatus must return zero. These bits reflect the @@ -131,14 +131,14 @@ CONST EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI mCustomGuidedSectionExtractionPpi = EFI_SUCCESS, the value of AuthenticationStatus is undefined. - + @retval EFI_SUCCESS The InputSection was successfully processed and the section contents were returned. - + @retval EFI_OUT_OF_RESOURCES The system has insufficient resources to process the request. - + @retval EFI_INVALID_PARAMETER The GUID in InputSection does not match this instance of the GUIDed Section Extraction PPI. @@ -159,7 +159,7 @@ CustomGuidedSectionExtract ( UINT32 ScratchBufferSize; UINT32 OutputBufferSize; UINT16 SectionAttribute; - + // // Init local variable // @@ -174,12 +174,12 @@ CustomGuidedSectionExtract ( &ScratchBufferSize, &SectionAttribute ); - + if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "GetInfo from guided section Failed - %r\n", Status)); return Status; } - + if (ScratchBufferSize != 0) { // // Allocate scratch buffer @@ -190,7 +190,7 @@ CustomGuidedSectionExtract ( } } - if (((SectionAttribute & EFI_GUIDED_SECTION_PROCESSING_REQUIRED) != 0) && OutputBufferSize > 0) { + if (((SectionAttribute & EFI_GUIDED_SECTION_PROCESSING_REQUIRED) != 0) && OutputBufferSize > 0) { // // Allocate output buffer // @@ -200,9 +200,9 @@ CustomGuidedSectionExtract ( } DEBUG ((DEBUG_INFO, "Customized Guided section Memory Size required is 0x%x and address is 0x%p\n", OutputBufferSize, *OutputBuffer)); } - + Status = ExtractGuidedSectionDecode ( - InputSection, + InputSection, OutputBuffer, ScratchBuffer, AuthenticationStatus @@ -214,16 +214,16 @@ CustomGuidedSectionExtract ( DEBUG ((DEBUG_ERROR, "Extract guided section Failed - %r\n", Status)); return Status; } - + *OutputSize = (UINTN) OutputBufferSize; - + return EFI_SUCCESS; } /** Main entry for Section Extraction PEIM driver. - - This routine registers the Section Extraction PPIs that have been registered + + This routine registers the Section Extraction PPIs that have been registered with the Section Extraction Library. @param FileHandle Handle of the file being invoked. @@ -238,7 +238,7 @@ EFIAPI SectionExtractionPeiEntry ( IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices - ) + ) { EFI_STATUS Status; EFI_GUID *ExtractHandlerGuidTable; @@ -246,10 +246,10 @@ SectionExtractionPeiEntry ( EFI_PEI_PPI_DESCRIPTOR *GuidPpi; // - // Get custom extract guided section method guid list + // Get custom extract guided section method guid list // ExtractHandlerNumber = ExtractGuidedSectionGetGuidList (&ExtractHandlerGuidTable); - + // // Install custom extraction guid PPI // @@ -264,6 +264,6 @@ SectionExtractionPeiEntry ( ASSERT_EFI_ERROR (Status); } } - + return EFI_SUCCESS; }