From nobody Thu May 9 00:06:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+82155+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82155+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1634331117; cv=none; d=zohomail.com; s=zohoarc; b=ag/d7qJO+yjj5sVFnOaXv8vqiO7rjKbJ/gIMiKAbxoSHSipA1lgA409jUesAlG92p+8JbfLiQErP2OrYpZVnOQZSB7osAIqlDWn7iQ6dnvoiRrEErUnZVOamTqSjuLkuNoCvLLDSJPueIkT9KPLG2/SCFltI8gHHHTTsYiYADfQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634331117; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=ndG5BGHx9Ska4tMKlpEIoTzgX4jU8TYuU/6S2Siqpho=; b=Db2ZX2ah3TVYZWZTnyFhA+aZdnD8zTfE/w3E41iRTwlVuZJtw77bA7gmAgzQvDADjAuy6wG7i80YHmLgQN8ckJVDwXG5gRticRe+Hh13GsMS7x2kF1K7j02HWmkmhTJ4z9rdU7ntykO8WAR3cu/iM+veCaq8U5RoaPA4P4ucNnA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82155+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1634331117449637.8769101195702; Fri, 15 Oct 2021 13:51:57 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id VSATYY1788612x0HvskVA5Wv; Fri, 15 Oct 2021 13:51:57 -0700 X-Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web12.2937.1634331116070071214 for ; Fri, 15 Oct 2021 13:51:56 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10138"; a="214919585" X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="214919585" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 13:51:55 -0700 X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="492697903" X-Received: from gdong1-mobl1.amr.corp.intel.com ([10.255.78.181]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 13:51:54 -0700 From: "Guo Dong" To: devel@edk2.groups.io Cc: Guo Dong , Ray Ni , Maurice Ma , Benjamin You Subject: [edk2-devel] [`edk2-devel][PATCH] UefiPayloadPkg: Fix ECC reported issues Date: Fri, 15 Oct 2021 13:51:39 -0700 Message-Id: <20211015205139.304-1-guo.dong@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,guo.dong@intel.com X-Gm-Message-State: 7z0vhxHJ0A1IZ2MFRmFpg30zx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634331117; bh=62Jqs9KIU2dCvJLpgR+gaYWGs4i8r6ZlapTm+6YBkUw=; h=Cc:Date:From:Reply-To:Subject:To; b=BDr5oo8SPEa2XD2+7HeUR62EuirwQw55nNTMznK5tXGgutJIUy3LLGA/7C888/y6aiO kxrfCO4VU7zVRFMNrLHm7hD1mnzQWb5KpafKlWyOaNQZLs6c/h/2fEOuE+ViBiW84HKUF otpruEJBH0z2B3sdIgC2khS4F5qw6qM8Bx4= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634331118321100001 Content-Type: text/plain; charset="utf-8" From: Guo Dong ECC reported some issues on UefiPayloadPkg, this patch fixed most of them except several files including ElfLib\Elf32.h, coreboot.h, CbParseLib.c, etc. It also removed unused functions in ResetSystemLib and Hob.c. Signed-off-by: Guo Dong Cc: Ray Ni Cc: Maurice Ma Cc: Benjamin You --- UefiPayloadPkg/Include/Library/BlParseLib.h | 8 += +++---- UefiPayloadPkg/Library/CbParseLib/CbParseLib.c | 22 += ++++++++++----------- UefiPayloadPkg/Library/DxeHobListLibNull/DxeHobListLibNull.c | 6 += +++++ UefiPayloadPkg/Library/PayloadEntryHobLib/Hob.c | 28 += +-------------------------- UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c | 4 += +-- UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c | 15 += +++++++++----- UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c | 4 += +++ UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.h | 2 +- UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformData.c | 2 +- UefiPayloadPkg/Library/ResetSystemLib/ResetSystemLib.c | 16 -= --------------- UefiPayloadPkg/Library/SblParseLib/SblParseLib.c | 2 +- UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c | 2 +- UefiPayloadPkg/UefiPayloadEntry/PrintHob.c | 17 += +++++++++++++++- UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c | 2 ++ UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h | 10 += ++++----- UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c | 20 += ++++++++++++------- 16 files changed, 79 insertions(+), 81 deletions(-) diff --git a/UefiPayloadPkg/Include/Library/BlParseLib.h b/UefiPayloadPkg/I= nclude/Library/BlParseLib.h index 49eac31248..7aa6d626c7 100644 --- a/UefiPayloadPkg/Include/Library/BlParseLib.h +++ b/UefiPayloadPkg/Include/Library/BlParseLib.h @@ -6,6 +6,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ +#ifndef __BOOTLOADER_PARSE_LIB__ +#define __BOOTLOADER_PARSE_LIB__ + #include #include #include @@ -13,9 +16,6 @@ #include #include =20 -#ifndef __BOOTLOADER_PARSE_LIB__ -#define __BOOTLOADER_PARSE_LIB__ - #define GET_BOOTLOADER_PARAMETER() PcdGet64 (PcdBootloaderParameter) =20 typedef RETURN_STATUS \ @@ -73,7 +73,7 @@ ParseSystemTable ( /** Find the serial port information =20 - @param SERIAL_PORT_INFO Pointer to serial port info structure + @param SerialPortInfo Pointer to serial port info structure =20 @retval RETURN_SUCCESS Successfully find the serial port information. @retval RETURN_NOT_FOUND Failed to find the serial port information . diff --git a/UefiPayloadPkg/Library/CbParseLib/CbParseLib.c b/UefiPayloadPk= g/Library/CbParseLib/CbParseLib.c index 4be5d66ba5..7b7f39968e 100644 --- a/UefiPayloadPkg/Library/CbParseLib/CbParseLib.c +++ b/UefiPayloadPkg/Library/CbParseLib/CbParseLib.c @@ -322,7 +322,7 @@ ParseCbMemTable ( ) { EFI_STATUS Status; - struct cb_memory *rec; + struct cb_memory *Rec; struct cb_memory_range *Range; UINT64 Start; UINT64 Size; @@ -339,13 +339,13 @@ ParseCbMemTable ( // // Get the coreboot memory table // - rec =3D (struct cb_memory *)FindCbTag (CB_TAG_MEMORY); - if (rec =3D=3D NULL) { + Rec =3D (struct cb_memory *)FindCbTag (CB_TAG_MEMORY); + if (Rec =3D=3D NULL) { return Status; } =20 - for (Index =3D 0; Index < MEM_RANGE_COUNT(rec); Index++) { - Range =3D MEM_RANGE_PTR(rec, Index); + for (Index =3D 0; Index < MEM_RANGE_COUNT(Rec); Index++) { + Range =3D MEM_RANGE_PTR(Rec, Index); Start =3D cb_unpack64(Range->start); Size =3D cb_unpack64(Range->size); =20 @@ -380,7 +380,7 @@ ParseMemoryInfo ( IN VOID *Params ) { - struct cb_memory *rec; + struct cb_memory *Rec; struct cb_memory_range *Range; UINTN Index; MEMROY_MAP_ENTRY MemoryMap; @@ -388,13 +388,13 @@ ParseMemoryInfo ( // // Get the coreboot memory table // - rec =3D (struct cb_memory *)FindCbTag (CB_TAG_MEMORY); - if (rec =3D=3D NULL) { + Rec =3D (struct cb_memory *)FindCbTag (CB_TAG_MEMORY); + if (Rec =3D=3D NULL) { return RETURN_NOT_FOUND; } =20 - for (Index =3D 0; Index < MEM_RANGE_COUNT(rec); Index++) { - Range =3D MEM_RANGE_PTR(rec, Index); + for (Index =3D 0; Index < MEM_RANGE_COUNT(Rec); Index++) { + Range =3D MEM_RANGE_PTR(Rec, Index); MemoryMap.Base =3D cb_unpack64(Range->start); MemoryMap.Size =3D cb_unpack64(Range->size); MemoryMap.Type =3D (UINT8)Range->type; @@ -449,7 +449,7 @@ ParseSystemTable ( /** Find the serial port information =20 - @param SERIAL_PORT_INFO Pointer to serial port info structure + @param SerialPortInfo Pointer to serial port info structure =20 @retval RETURN_SUCCESS Successfully find the serial port information. @retval RETURN_NOT_FOUND Failed to find the serial port information . diff --git a/UefiPayloadPkg/Library/DxeHobListLibNull/DxeHobListLibNull.c b= /UefiPayloadPkg/Library/DxeHobListLibNull/DxeHobListLibNull.c index 92d3e17ef0..6c69f9879e 100644 --- a/UefiPayloadPkg/Library/DxeHobListLibNull/DxeHobListLibNull.c +++ b/UefiPayloadPkg/Library/DxeHobListLibNull/DxeHobListLibNull.c @@ -10,6 +10,12 @@ =20 #include =20 +/** + The dummy constructor for DxeHobListLib. + + @retval EFI_SUCCESS + +**/ EFI_STATUS EFIAPI DxeHobListLibNullConstructor ( diff --git a/UefiPayloadPkg/Library/PayloadEntryHobLib/Hob.c b/UefiPayloadP= kg/Library/PayloadEntryHobLib/Hob.c index dd25ac2682..61cd11ba03 100644 --- a/UefiPayloadPkg/Library/PayloadEntryHobLib/Hob.c +++ b/UefiPayloadPkg/Library/PayloadEntryHobLib/Hob.c @@ -168,31 +168,6 @@ BuildResourceDescriptorHob ( Hob->ResourceLength =3D NumberOfBytes; } =20 -VOID -EFIAPI -BuildFvHobs ( - IN EFI_PHYSICAL_ADDRESS PhysicalStart, - IN UINT64 NumberOfBytes, - IN EFI_RESOURCE_ATTRIBUTE_TYPE *ResourceAttribute - ) -{ - - EFI_RESOURCE_ATTRIBUTE_TYPE Resource; - - BuildFvHob (PhysicalStart, NumberOfBytes); - - if (ResourceAttribute =3D=3D NULL) { - Resource =3D (EFI_RESOURCE_ATTRIBUTE_PRESENT | - EFI_RESOURCE_ATTRIBUTE_INITIALIZED | - EFI_RESOURCE_ATTRIBUTE_TESTED | - EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE); - } else { - Resource =3D *ResourceAttribute; - } - - BuildResourceDescriptorHob (EFI_RESOURCE_FIRMWARE_DEVICE, Resource, Phys= icalStart, NumberOfBytes); -} - /** Returns the next instance of a HOB type from the starting HOB. =20 @@ -283,7 +258,8 @@ EFIAPI GetNextGuidHob ( IN CONST EFI_GUID *Guid, IN CONST VOID *HobStart - ){ + ) +{ EFI_PEI_HOB_POINTERS GuidHob; =20 GuidHob.Raw =3D (UINT8 *) HobStart; diff --git a/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c b/U= efiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c index a0d7cdc306..0eddebe229 100644 --- a/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c +++ b/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c @@ -210,8 +210,8 @@ PciHostBridgeGetRootBridges ( Free the root bridge instances array returned from PciHostBridgeGetRootBridges(). =20 - @param The root bridge instances array. - @param The count of the array. + @param Bridges The root bridge instances array. + @param Count The count of the array. **/ VOID EFIAPI diff --git a/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c= b/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c index b0268f0506..eb28d48b3b 100644 --- a/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c +++ b/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c @@ -205,7 +205,7 @@ PcatPciRootBridgeParseBars ( // // IO Bar // - if (Command & EFI_PCI_COMMAND_IO_SPACE) { + if ((Command & EFI_PCI_COMMAND_IO_SPACE) !=3D 0) { Mask =3D 0xfffffffc; Base =3D OriginalValue & Mask; Length =3D ((~(Value & Mask)) & Mask) + 0x04; @@ -227,7 +227,7 @@ PcatPciRootBridgeParseBars ( // // Mem Bar // - if (Command & EFI_PCI_COMMAND_MEMORY_SPACE) { + if ((Command & EFI_PCI_COMMAND_MEMORY_SPACE) !=3D 0) { =20 Mask =3D 0xfffffff0; Base =3D OriginalValue & Mask; @@ -306,9 +306,14 @@ ScanForRootBridges ( UINT64 Base; UINT64 Limit; UINT64 Value; - PCI_ROOT_BRIDGE_APERTURE Io, Mem, MemAbove4G, PMem, PMemAbove4G, *MemApe= rture; - PCI_ROOT_BRIDGE *RootBridges; - UINTN BarOffsetEnd; + PCI_ROOT_BRIDGE_APERTURE Io; + PCI_ROOT_BRIDGE_APERTURE Mem; + PCI_ROOT_BRIDGE_APERTURE MemAbove4G; + PCI_ROOT_BRIDGE_APERTURE PMem; + PCI_ROOT_BRIDGE_APERTURE PMemAbove4G; + PCI_ROOT_BRIDGE_APERTURE *MemAperture; + PCI_ROOT_BRIDGE *RootBridges; + UINTN BarOffsetEnd; =20 =20 *NumberOfRootBridges =3D 0; diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootMana= ger.c b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c index c4d317fa9e..dd91fcb29d 100644 --- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c +++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c @@ -15,6 +15,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_PROTOCOL *mUniversalPayl= oadPlatformBootManagerOverrideInstance =3D NULL; =20 +/** + Signal EndOfDxe event and install SMM Ready to lock protocol. + +**/ VOID InstallReadyToLock ( VOID diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootMana= ger.h b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.h index 2f600c796f..cad7fe2b9d 100644 --- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.h +++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.h @@ -1,4 +1,4 @@ -/**@file +/** @file Head file for BDS Platform specific code =20 Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformData.c b= /UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformData.c index d17e660e0f..892a7f01be 100644 --- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformData.c +++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformData.c @@ -1,4 +1,4 @@ -/**@file +/** @file Defined the platform specific device path which will be filled to ConIn/ConOut variables. =20 diff --git a/UefiPayloadPkg/Library/ResetSystemLib/ResetSystemLib.c b/UefiP= ayloadPkg/Library/ResetSystemLib/ResetSystemLib.c index 2e4b7fe592..b35a4cc1d9 100644 --- a/UefiPayloadPkg/Library/ResetSystemLib/ResetSystemLib.c +++ b/UefiPayloadPkg/Library/ResetSystemLib/ResetSystemLib.c @@ -43,22 +43,6 @@ ResetSystemLibConstructor ( return EFI_SUCCESS; } =20 - -VOID -AcpiPmControl ( - UINTN SuspendType - ) -{ - UINTN PmCtrlReg; - - ASSERT (SuspendType <=3D 7); - - PmCtrlReg =3D (UINTN)mAcpiBoardInfo.PmCtrlRegBase; - IoAndThenOr16 (PmCtrlReg, (UINT16) ~0x3c00, (UINT16) (SuspendType << 10)= ); - IoOr16 (PmCtrlReg, BIT13); - CpuDeadLoop (); -} - /** Calling this function causes a system-wide reset. This sets all circuitry within the system to its initial state. This type of reset diff --git a/UefiPayloadPkg/Library/SblParseLib/SblParseLib.c b/UefiPayload= Pkg/Library/SblParseLib/SblParseLib.c index ccdcbfc07d..fc6b1b9a16 100644 --- a/UefiPayloadPkg/Library/SblParseLib/SblParseLib.c +++ b/UefiPayloadPkg/Library/SblParseLib/SblParseLib.c @@ -141,7 +141,7 @@ ParseSystemTable ( /** Find the serial port information =20 - @param SERIAL_PORT_INFO Pointer to serial port info structure + @param[out] SerialPortInfo Pointer to serial port info structure =20 @retval RETURN_SUCCESS Successfully find the serial port information. @retval RETURN_NOT_FOUND Failed to find the serial port information . diff --git a/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c b/UefiPayloadPkg= /UefiPayloadEntry/LoadDxeCore.c index 0b6cb47cd0..67eed179f0 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c +++ b/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c @@ -190,7 +190,7 @@ FvFindFileByTypeGuid ( =20 @param FileHeader A pointer to the file header that contains= the set of sections to be searched. - @param SearchType The value of the section type to search. + @param SectionType The value of the section type to search. @param SectionData A pointer to the discovered section, if su= ccessful. =20 @retval EFI_SUCCESS The section was found. diff --git a/UefiPayloadPkg/UefiPayloadEntry/PrintHob.c b/UefiPayloadPkg/Ue= fiPayloadEntry/PrintHob.c index 265d47ca9d..d7f3af1304 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/PrintHob.c +++ b/UefiPayloadPkg/UefiPayloadEntry/PrintHob.c @@ -196,7 +196,10 @@ PrintResourceDiscriptorHob ( =20 /** Print the information in Acpi Guid Hob. + @param[in] HobRaw A pointer to the start of gUniversalPayloadAc= piTableGuid HOB. + @param[in] HobLength The size of the HOB data buffer. + @retval EFI_SUCCESS If it completed successfully. **/ EFI_STATUS @@ -217,6 +220,8 @@ PrintAcpiGuidHob ( /** Print the information in Serial Guid Hob. @param[in] HobRaw A pointer to the start of gUniversalPayloadSe= rialPortInfoGuid HOB. + @param[in] HobLength The size of the HOB data buffer. + @retval EFI_SUCCESS If it completed successfully. **/ EFI_STATUS @@ -240,6 +245,7 @@ PrintSerialGuidHob ( /** Print the information in Smbios Guid Hob. @param[in] HobRaw A pointer to the start of gUniversalPayloadSm= bios3TableGuid HOB. + @param[in] HobLength The size of the HOB data buffer. @retval EFI_SUCCESS If it completed successfully. **/ EFI_STATUS @@ -260,6 +266,8 @@ PrintSmbios3GuidHob ( /** Print the information in Smbios Guid Hob. @param[in] HobRaw A pointer to the start of gUniversalPayloadSm= biosTableGuid HOB. + @param[in] HobLength The size of the HOB data buffer. + @retval EFI_SUCCESS If it completed successfully. **/ EFI_STATUS @@ -280,6 +288,8 @@ PrintSmbiosTablGuidHob ( /** Print the information in Acpi BoardInfo Guid Hob. @param[in] HobRaw A pointer to the start of gUefiAcpiBoardInfoG= uid HOB. + @param[in] HobLength The size of the HOB data buffer. + @retval EFI_SUCCESS If it completed successfully. **/ EFI_STATUS @@ -307,6 +317,7 @@ PrintAcpiBoardInfoGuidHob ( /** Print the information in Pci RootBridge Info Guid Hob. @param[in] HobRaw A pointer to the start of gUniversalPayloadPc= iRootBridgeInfoGuid HOB. + @param[in] HobLength The size of the HOB data buffer. =20 @retval EFI_SUCCESS If it completed successfully. **/ @@ -362,6 +373,8 @@ PrintPciRootBridgeInfoGuidHob ( /** Print the information in Extra Data Guid Hob. @param[in] HobRaw A pointer to the start of gUniversalPayloadEx= traDataGuid HOB. + @param[in] HobLength The size of the HOB data buffer. + @retval EFI_SUCCESS If it completed successfully. **/ EFI_STATUS @@ -394,6 +407,8 @@ PrintExtraDataGuidHob ( /** Print the information in MemoryTypeInfoGuidHob. @param[in] HobRaw A pointer to the start of gEfiMemoryTypeInfor= mationGuid HOB. + @param[in] HobLength The size of the HOB data buffer. + @retval EFI_SUCCESS If it completed successfully. **/ EFI_STATUS @@ -414,7 +429,7 @@ PrintMemoryTypeInfoGuidHob ( /** Print the information in EdkiiBootManagerMenuFileGuid. @param[in] HobRaw A pointer to the start of gEdkiiBootManagerMe= nuFileGuid HOB. - @param[in] HobLength The size of the data buffer. + @param[in] HobLength The size of the HOB data buffer. @retval EFI_SUCCESS If it completed successfully. **/ EFI_STATUS diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c b/UefiPaylo= adPkg/UefiPayloadEntry/UefiPayloadEntry.c index 0e6dcf10f9..adc56dc15f 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c @@ -389,6 +389,8 @@ BuildGenericHob ( /** Entry point to the C language phase of UEFI payload. =20 + @param[in] BootloaderParameter The starting address of bootloader p= arameter block. + @retval It will not return if SUCCESS, and return error when passin= g bootloader parameter. **/ EFI_STATUS diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h b/UefiPaylo= adPkg/UefiPayloadEntry/UefiPayloadEntry.h index de51c2fba9..637ed9c20b 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h @@ -1,9 +1,9 @@ /** @file -* -* Copyright (c) 2021, Intel Corporation. All rights reserved.
-* -* SPDX-License-Identifier: BSD-2-Clause-Patent -* + + Copyright (c) 2021, Intel Corporation. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + **/ =20 #ifndef __UEFI_PAYLOAD_ENTRY_H__ diff --git a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c b/Uefi= PayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c index 7e67cf0f04..4d1096b323 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c +++ b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c @@ -114,18 +114,19 @@ AddNewHob ( } =20 /** - Found the Resource Descriptor HOB that contains a range + Found the Resource Descriptor HOB that contains a range (Base, Top) =20 + @param[in] HobList Hob start address @param[in] Base Memory start address - @param[in] Top Memory Top. + @param[in] Top Memory end address. =20 - @return The pointer to the Resource Descriptor HOB. + @retval The pointer to the Resource Descriptor HOB. **/ EFI_HOB_RESOURCE_DESCRIPTOR * FindResourceDescriptorByRange ( - VOID *HobList, - EFI_PHYSICAL_ADDRESS Base, - EFI_PHYSICAL_ADDRESS Top + IN VOID *HobList, + IN EFI_PHYSICAL_ADDRESS Base, + IN EFI_PHYSICAL_ADDRESS Top ) { EFI_PEI_HOB_POINTERS Hob; @@ -171,7 +172,7 @@ FindResourceDescriptorByRange ( @param[in] MinimalNeededSize Minimal needed size. @param[in] ExceptResourceHob Ignore this Resource Descriptor. =20 - @return The pointer to the Resource Descriptor HOB. + @retval The pointer to the Resource Descriptor HOB. **/ EFI_HOB_RESOURCE_DESCRIPTOR * FindAnotherHighestBelow4GResourceDescriptor ( @@ -240,6 +241,9 @@ FindAnotherHighestBelow4GResourceDescriptor ( /** It will build HOBs based on information from bootloaders. =20 + @param[in] BootloaderParameter The starting memory address of bootloa= der parameter block. + @param[out] DxeFv The pointer to the DXE FV in memory. + @retval EFI_SUCCESS If it completed successfully. @retval Others If it failed to build required HOBs. **/ @@ -376,6 +380,8 @@ BuildHobs ( /** Entry point to the C language phase of UEFI payload. =20 + @param[in] BootloaderParameter The starting address of bootloader p= arameter block. + @retval It will not return if SUCCESS, and return error when passin= g bootloader parameter. **/ EFI_STATUS --=20 2.32.0.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#82155): https://edk2.groups.io/g/devel/message/82155 Mute This Topic: https://groups.io/mt/86359287/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-