]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiPayloadPkg: Fix ECC reported issues
authorGuo Dong <guo.dong@intel.com>
Fri, 15 Oct 2021 19:10:11 +0000 (12:10 -0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 19 Oct 2021 04:27:41 +0000 (04:27 +0000)
V2: Fix more header files on #ifdef variable

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 <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Reviewed-by: Maurice Ma <maurice.ma@intel.com>
25 files changed:
UefiPayloadPkg/Include/Coreboot.h
UefiPayloadPkg/Include/Guid/AcpiBoardInfoGuid.h
UefiPayloadPkg/Include/Guid/MemoryMapInfoGuid.h
UefiPayloadPkg/Include/Guid/SerialPortInfoGuid.h
UefiPayloadPkg/Include/Guid/SystemTableInfoGuid.h
UefiPayloadPkg/Include/Library/BlParseLib.h
UefiPayloadPkg/Include/Library/DxeHobListLib.h
UefiPayloadPkg/Include/Library/PlatformSupportLib.h
UefiPayloadPkg/Library/CbParseLib/CbParseLib.c
UefiPayloadPkg/Library/DxeHobListLibNull/DxeHobListLibNull.c
UefiPayloadPkg/Library/PayloadEntryHobLib/Hob.c
UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridge.h
UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c
UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.h
UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformConsole.h
UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformData.c
UefiPayloadPkg/Library/ResetSystemLib/ResetSystemLib.c
UefiPayloadPkg/Library/SblParseLib/SblParseLib.c
UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c
UefiPayloadPkg/UefiPayloadEntry/PrintHob.c
UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c
UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h
UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c

index 8a6c300cdef3e85903c62ba9f895ca87bf4e6700..86e14a1a4d88b9fccfe650bc1b41805252e8d1d2 100644 (file)
@@ -245,5 +245,6 @@ struct cb_cbmem_tab {
   (void *)(((UINT8 *) (_rec)) + sizeof(*(_rec)) \\r
     + (sizeof((_rec)->map[0]) * (_idx)))\r
 \r
+typedef struct cb_memory  CB_MEMORY;\r
 \r
 #endif // _COREBOOT_PEI_H_INCLUDED_\r
index 043b748ae4a9b9745ccf1a605d9d61cd341ce11d..2ff0677165e59f586f39200e701d6fdabc781725 100644 (file)
@@ -6,8 +6,8 @@
 \r
 **/\r
 \r
-#ifndef __ACPI_BOARD_INFO_GUID_H__\r
-#define __ACPI_BOARD_INFO_GUID_H__\r
+#ifndef ACPI_BOARD_INFO_GUID_H_\r
+#define ACPI_BOARD_INFO_GUID_H_\r
 \r
 ///\r
 /// Board information GUID\r
index 47922b18512ac3bd06348e8a03741423a1e89cab..1dda3ee7c50a48e22289c059113b08df84df9393 100644 (file)
@@ -6,8 +6,8 @@
 \r
 **/\r
 \r
-#ifndef __MEMORY_MAP_INFO_GUID_H__\r
-#define __MEMORY_MAP_INFO_GUID_H__\r
+#ifndef MEMORY_MAP_INFO_GUID_H_\r
+#define MEMORY_MAP_INFO_GUID_H_\r
 \r
 #include <Library/PcdLib.h>\r
 \r
index a15d5b867125aba37bfb7eb143e88218a181b780..10197134a39d6ea6625543c90434102577dca9a1 100644 (file)
@@ -6,8 +6,8 @@
 \r
 **/\r
 \r
-#ifndef __SERIAL_PORT_INFO_GUID_H__\r
-#define __SERIAL_PORT_INFO_GUID_H__\r
+#ifndef SERIAL_PORT_INFO_GUID_H_\r
+#define SERIAL_PORT_INFO_GUID_H_\r
 \r
 ///\r
 /// Serial Port Information GUID\r
index 2446820285cc0d8e95be8c22cc98d8cd51bf768e..e742dd0ca5581391f49bd38327016e59ca4f7051 100644 (file)
@@ -6,8 +6,8 @@
 \r
 **/\r
 \r
-#ifndef __SYSTEM_TABLE_INFO_GUID_H__\r
-#define __SYSTEM_TABLE_INFO_GUID_H__\r
+#ifndef SYSTEM_TABLE_INFO_GUID_H_\r
+#define SYSTEM_TABLE_INFO_GUID_H_\r
 \r
 ///\r
 /// System Table Information GUID\r
index 433a83f8b878de072e85e1fa63e8f6b67326945c..7198e419bd3a2594a118895d25ec88d34c249a74 100644 (file)
@@ -6,6 +6,9 @@
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
+#ifndef BOOTLOADER_PARSE_LIB_\r
+#define BOOTLOADER_PARSE_LIB_\r
+\r
 #include <PiPei.h>\r
 #include <Guid/GraphicsInfoHob.h>\r
 #include <Guid/MemoryMapInfoGuid.h>\r
@@ -13,9 +16,6 @@
 #include <Guid/SystemTableInfoGuid.h>\r
 #include <Guid/AcpiBoardInfoGuid.h>\r
 \r
-#ifndef __BOOTLOADER_PARSE_LIB__\r
-#define __BOOTLOADER_PARSE_LIB__\r
-\r
 #define GET_BOOTLOADER_PARAMETER()      PcdGet64 (PcdBootloaderParameter)\r
 \r
 typedef RETURN_STATUS \\r
@@ -73,7 +73,7 @@ ParseSystemTable (
 /**\r
   Find the serial port information\r
 \r
-  @param  SERIAL_PORT_INFO   Pointer to serial port info structure\r
+  @param  SerialPortInfo     Pointer to serial port info structure\r
 \r
   @retval RETURN_SUCCESS     Successfully find the serial port information.\r
   @retval RETURN_NOT_FOUND   Failed to find the serial port information .\r
index 7e9b23f6d780a744e1e4239ec737aec50e01a3c1..139b11e3296a4f98c6f71a282409f5c586971ee0 100644 (file)
@@ -15,8 +15,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 \r
 **/\r
 \r
-#ifndef __DXE_HOB_LIST_LIB_H__\r
-#define __DXE_HOB_LIST_LIB_H__\r
+#ifndef DXE_HOB_LIST_LIB_H_\r
+#define DXE_HOB_LIST_LIB_H_\r
 \r
 ///\r
 /// Cache copy of the start of HOB list\r
index d9f0b830753a4c06843646740d684b28d5b988ed..73263722eb8c7bd86af2fe30b47145849039e1a1 100644 (file)
@@ -8,8 +8,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 \r
 **/\r
 \r
-#ifndef __BOOTLOADER_PLATFORM_SUPPORT_LIB__\r
-#define __BOOTLOADER_PLATFORM_SUPPORT_LIB__\r
+#ifndef BOOTLOADER_PLATFORM_SUPPORT_LIB_\r
+#define BOOTLOADER_PLATFORM_SUPPORT_LIB_\r
 \r
 /**\r
   Parse platform specific information from bootloader\r
index 57e1cadc342ea57e06451bbce6d99fac442874b0..46314e55663cd1162bebaf3093594ff782c42492 100644 (file)
@@ -322,7 +322,7 @@ ParseCbMemTable (
   )\r
 {\r
   EFI_STATUS               Status;\r
-  struct cb_memory         *rec;\r
+  CB_MEMORY                *Rec;\r
   struct cb_memory_range   *Range;\r
   UINT64                   Start;\r
   UINT64                   Size;\r
@@ -339,13 +339,13 @@ ParseCbMemTable (
   //\r
   // Get the coreboot memory table\r
   //\r
-  rec = (struct cb_memory *)FindCbTag (CB_TAG_MEMORY);\r
-  if (rec == NULL) {\r
+  Rec = (CB_MEMORY *)FindCbTag (CB_TAG_MEMORY);\r
+  if (Rec == NULL) {\r
     return Status;\r
   }\r
 \r
-  for (Index = 0; Index < MEM_RANGE_COUNT(rec); Index++) {\r
-    Range = MEM_RANGE_PTR(rec, Index);\r
+  for (Index = 0; Index < MEM_RANGE_COUNT(Rec); Index++) {\r
+    Range = MEM_RANGE_PTR(Rec, Index);\r
     Start = cb_unpack64(Range->start);\r
     Size = cb_unpack64(Range->size);\r
 \r
@@ -380,7 +380,7 @@ ParseMemoryInfo (
   IN  VOID                  *Params\r
   )\r
 {\r
-  struct cb_memory         *rec;\r
+  CB_MEMORY                *Rec;\r
   struct cb_memory_range   *Range;\r
   UINTN                    Index;\r
   MEMORY_MAP_ENTRY         MemoryMap;\r
@@ -388,13 +388,13 @@ ParseMemoryInfo (
   //\r
   // Get the coreboot memory table\r
   //\r
-  rec = (struct cb_memory *)FindCbTag (CB_TAG_MEMORY);\r
-  if (rec == NULL) {\r
+  Rec = (CB_MEMORY *)FindCbTag (CB_TAG_MEMORY);\r
+  if (Rec == NULL) {\r
     return RETURN_NOT_FOUND;\r
   }\r
 \r
-  for (Index = 0; Index < MEM_RANGE_COUNT(rec); Index++) {\r
-    Range = MEM_RANGE_PTR(rec, Index);\r
+  for (Index = 0; Index < MEM_RANGE_COUNT(Rec); Index++) {\r
+    Range = MEM_RANGE_PTR(Rec, Index);\r
     MemoryMap.Base = cb_unpack64(Range->start);\r
     MemoryMap.Size = cb_unpack64(Range->size);\r
     MemoryMap.Type = (UINT8)Range->type;\r
@@ -449,7 +449,7 @@ ParseSystemTable (
 /**\r
   Find the serial port information\r
 \r
-  @param  SERIAL_PORT_INFO   Pointer to serial port info structure\r
+  @param  SerialPortInfo     Pointer to serial port info structure\r
 \r
   @retval RETURN_SUCCESS     Successfully find the serial port information.\r
   @retval RETURN_NOT_FOUND   Failed to find the serial port information .\r
index 92d3e17ef098f523512f9f9a39181c528ae0cd09..6c69f9879ea9c6148dcc725576cf51a8b01be0be 100644 (file)
 \r
 #include <Uefi.h>\r
 \r
+/**\r
+  The dummy constructor for DxeHobListLib.\r
+\r
+  @retval  EFI_SUCCESS\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 DxeHobListLibNullConstructor (\r
index dd25ac2682ae16535d7712433ed5d9b0e4ef968f..61cd11ba03359e0dd477affbac19bd25c4a6065d 100644 (file)
@@ -168,31 +168,6 @@ BuildResourceDescriptorHob (
   Hob->ResourceLength    = NumberOfBytes;\r
 }\r
 \r
-VOID\r
-EFIAPI\r
-BuildFvHobs (\r
-  IN EFI_PHYSICAL_ADDRESS         PhysicalStart,\r
-  IN UINT64                       NumberOfBytes,\r
-  IN EFI_RESOURCE_ATTRIBUTE_TYPE  *ResourceAttribute\r
-  )\r
-{\r
-\r
-  EFI_RESOURCE_ATTRIBUTE_TYPE Resource;\r
-\r
-  BuildFvHob (PhysicalStart, NumberOfBytes);\r
-\r
-  if (ResourceAttribute == NULL) {\r
-    Resource = (EFI_RESOURCE_ATTRIBUTE_PRESENT    |\r
-                EFI_RESOURCE_ATTRIBUTE_INITIALIZED |\r
-                EFI_RESOURCE_ATTRIBUTE_TESTED |\r
-                EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE);\r
-  } else {\r
-    Resource = *ResourceAttribute;\r
-  }\r
-\r
-  BuildResourceDescriptorHob (EFI_RESOURCE_FIRMWARE_DEVICE, Resource, PhysicalStart, NumberOfBytes);\r
-}\r
-\r
 /**\r
   Returns the next instance of a HOB type from the starting HOB.\r
 \r
@@ -283,7 +258,8 @@ EFIAPI
 GetNextGuidHob (\r
   IN CONST EFI_GUID         *Guid,\r
   IN CONST VOID             *HobStart\r
-  ){\r
+  )\r
+{\r
   EFI_PEI_HOB_POINTERS  GuidHob;\r
 \r
   GuidHob.Raw = (UINT8 *) HobStart;\r
index 3eee1fbeac863f2e41b1a463fc1aeeaa5d15c63c..2848da5ce695eda14353fab46f22179ca04cdb7c 100644 (file)
@@ -8,8 +8,8 @@
 \r
 **/\r
 \r
-#ifndef _PCI_HOST_BRIDGE_H\r
-#define _PCI_HOST_BRIDGE_H\r
+#ifndef PCI_HOST_BRIDGE_H_\r
+#define PCI_HOST_BRIDGE_H_\r
 \r
 #include <UniversalPayload/PciRootBridges.h>\r
 \r
index a0d7cdc306fc13f5510443668af7a0112166a3c9..0eddebe2291dbd746128eabab6ee5515deed37f9 100644 (file)
@@ -210,8 +210,8 @@ PciHostBridgeGetRootBridges (
   Free the root bridge instances array returned from\r
   PciHostBridgeGetRootBridges().\r
 \r
-  @param  The root bridge instances array.\r
-  @param  The count of the array.\r
+  @param  Bridges    The root bridge instances array.\r
+  @param  Count      The count of the array.\r
 **/\r
 VOID\r
 EFIAPI\r
index b0268f05069ce6b0bf3d39cccf185d6f00f2a739..eb28d48b3b732b209fa07be692fd87fa966b1b31 100644 (file)
@@ -205,7 +205,7 @@ PcatPciRootBridgeParseBars (
       //\r
       // IO Bar\r
       //\r
-      if (Command & EFI_PCI_COMMAND_IO_SPACE) {\r
+      if ((Command & EFI_PCI_COMMAND_IO_SPACE) != 0) {\r
         Mask = 0xfffffffc;\r
         Base = OriginalValue & Mask;\r
         Length = ((~(Value & Mask)) & Mask) + 0x04;\r
@@ -227,7 +227,7 @@ PcatPciRootBridgeParseBars (
       //\r
       // Mem Bar\r
       //\r
-      if (Command & EFI_PCI_COMMAND_MEMORY_SPACE) {\r
+      if ((Command & EFI_PCI_COMMAND_MEMORY_SPACE) != 0) {\r
 \r
         Mask = 0xfffffff0;\r
         Base = OriginalValue & Mask;\r
@@ -306,9 +306,14 @@ ScanForRootBridges (
   UINT64     Base;\r
   UINT64     Limit;\r
   UINT64     Value;\r
-  PCI_ROOT_BRIDGE_APERTURE Io, Mem, MemAbove4G, PMem, PMemAbove4G, *MemAperture;\r
-  PCI_ROOT_BRIDGE *RootBridges;\r
-  UINTN      BarOffsetEnd;\r
+  PCI_ROOT_BRIDGE_APERTURE Io;\r
+  PCI_ROOT_BRIDGE_APERTURE Mem;\r
+  PCI_ROOT_BRIDGE_APERTURE MemAbove4G;\r
+  PCI_ROOT_BRIDGE_APERTURE PMem;\r
+  PCI_ROOT_BRIDGE_APERTURE PMemAbove4G;\r
+  PCI_ROOT_BRIDGE_APERTURE *MemAperture;\r
+  PCI_ROOT_BRIDGE          *RootBridges;\r
+  UINTN                    BarOffsetEnd;\r
 \r
 \r
   *NumberOfRootBridges = 0;\r
index c4d317fa9e25fa5f746c563baac168071eb40e09..dd91fcb29dc1cda2580e59362bf6dcdfff735850 100644 (file)
@@ -15,6 +15,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 \r
 UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_PROTOCOL  *mUniversalPayloadPlatformBootManagerOverrideInstance = NULL;\r
 \r
+/**\r
+  Signal EndOfDxe event and install SMM Ready to lock protocol.\r
+\r
+**/\r
 VOID\r
 InstallReadyToLock (\r
   VOID\r
index 2f600c796ff2d751799ef3014f6bbf0f5f0d79ee..c781610c6cf3aabd98ee6250ec0b3df3f79d05c9 100644 (file)
@@ -1,12 +1,12 @@
-/**@file\r
+/** @file\r
    Head file for BDS Platform specific code\r
 \r
 Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
 SPDX-License-Identifier: BSD-2-Clause-Patent\r
 **/\r
 \r
-#ifndef _PLATFORM_BOOT_MANAGER_H\r
-#define _PLATFORM_BOOT_MANAGER_H\r
+#ifndef PLATFORM_BOOT_MANAGER_H_\r
+#define PLATFORM_BOOT_MANAGER_H_\r
 \r
 #include <PiDxe.h>\r
 #include <Protocol/LoadedImage.h>\r
index 68bdf5e555d701950a10692931ad9f33ba7e3437..e9d0eb00ee067d6debd4ac123a25031c310df395 100644 (file)
@@ -5,8 +5,8 @@ Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent\r
 **/\r
 \r
-#ifndef _PLATFORM_CONSOLE_H\r
-#define _PLATFORM_CONSOLE_H\r
+#ifndef PLATFORM_CONSOLE_H_\r
+#define PLATFORM_CONSOLE_H_\r
 \r
 #include <PiDxe.h>\r
 #include <IndustryStandard/Pci.h>\r
index d17e660e0f40e71418f49e19af0107126994c99f..892a7f01be9e54477e8aaa9d378c48c7a16e4667 100644 (file)
@@ -1,4 +1,4 @@
-/**@file\r
+/** @file\r
   Defined the platform specific device path which will be filled to\r
   ConIn/ConOut variables.\r
 \r
index 2e4b7fe59261087de6fe17b07cce13295c617aca..b35a4cc1d9535bfa50f3d4b30d72d78d60141051 100644 (file)
@@ -43,22 +43,6 @@ ResetSystemLibConstructor (
   return EFI_SUCCESS;\r
 }\r
 \r
-\r
-VOID\r
-AcpiPmControl (\r
-  UINTN   SuspendType\r
-  )\r
-{\r
-  UINTN              PmCtrlReg;\r
-\r
-  ASSERT (SuspendType <= 7);\r
-\r
-  PmCtrlReg = (UINTN)mAcpiBoardInfo.PmCtrlRegBase;\r
-  IoAndThenOr16 (PmCtrlReg, (UINT16) ~0x3c00, (UINT16) (SuspendType << 10));\r
-  IoOr16 (PmCtrlReg, BIT13);\r
-  CpuDeadLoop ();\r
-}\r
-\r
 /**\r
   Calling this function causes a system-wide reset. This sets\r
   all circuitry within the system to its initial state. This type of reset\r
index 6904529925b545e5a989f6660b2b89a5710a5887..eeb0dfe74a7827430d7d85a13738156809b831cd 100644 (file)
@@ -141,7 +141,7 @@ ParseSystemTable (
 /**\r
   Find the serial port information\r
 \r
-  @param  SERIAL_PORT_INFO   Pointer to serial port info structure\r
+  @param[out]  SerialPortInfo     Pointer to serial port info structure\r
 \r
   @retval RETURN_SUCCESS     Successfully find the serial port information.\r
   @retval RETURN_NOT_FOUND   Failed to find the serial port information .\r
index 0b6cb47cd0ed965a5654325e64c957ee37be807b..67eed179f00e573cfdfeb8e5c42490033d41c1d8 100644 (file)
@@ -190,7 +190,7 @@ FvFindFileByTypeGuid (
 \r
   @param  FileHeader            A pointer to the file header that contains the set of sections to\r
                                 be searched.\r
-  @param  SearchType            The value of the section type to search.\r
+  @param  SectionType            The value of the section type to search.\r
   @param  SectionData           A pointer to the discovered section, if successful.\r
 \r
   @retval EFI_SUCCESS           The section was found.\r
index 265d47ca9d6a76069a04b590cba738c2ed28a0bb..d7f3af130444f55fb7ced9a06006c69f812f5c8c 100644 (file)
@@ -196,7 +196,10 @@ PrintResourceDiscriptorHob (
 \r
 /**\r
   Print the information in Acpi Guid Hob.\r
+\r
   @param[in] HobRaw          A pointer to the start of gUniversalPayloadAcpiTableGuid HOB.\r
+  @param[in] HobLength       The size of the HOB data buffer.\r
+\r
   @retval EFI_SUCCESS        If it completed successfully.\r
 **/\r
 EFI_STATUS\r
@@ -217,6 +220,8 @@ PrintAcpiGuidHob (
 /**\r
   Print the information in Serial Guid Hob.\r
   @param[in] HobRaw          A pointer to the start of gUniversalPayloadSerialPortInfoGuid HOB.\r
+  @param[in] HobLength       The size of the HOB data buffer.\r
+\r
   @retval EFI_SUCCESS        If it completed successfully.\r
 **/\r
 EFI_STATUS\r
@@ -240,6 +245,7 @@ PrintSerialGuidHob (
 /**\r
   Print the information in Smbios Guid Hob.\r
   @param[in] HobRaw          A pointer to the start of gUniversalPayloadSmbios3TableGuid HOB.\r
+  @param[in] HobLength       The size of the HOB data buffer.\r
   @retval EFI_SUCCESS        If it completed successfully.\r
 **/\r
 EFI_STATUS\r
@@ -260,6 +266,8 @@ PrintSmbios3GuidHob (
 /**\r
   Print the information in Smbios Guid Hob.\r
   @param[in] HobRaw          A pointer to the start of gUniversalPayloadSmbiosTableGuid HOB.\r
+  @param[in] HobLength       The size of the HOB data buffer.\r
+\r
   @retval EFI_SUCCESS        If it completed successfully.\r
 **/\r
 EFI_STATUS\r
@@ -280,6 +288,8 @@ PrintSmbiosTablGuidHob (
 /**\r
   Print the information in Acpi BoardInfo Guid Hob.\r
   @param[in] HobRaw          A pointer to the start of gUefiAcpiBoardInfoGuid HOB.\r
+  @param[in] HobLength       The size of the HOB data buffer.\r
+\r
   @retval EFI_SUCCESS        If it completed successfully.\r
 **/\r
 EFI_STATUS\r
@@ -307,6 +317,7 @@ PrintAcpiBoardInfoGuidHob (
 /**\r
   Print the information in Pci RootBridge Info Guid Hob.\r
   @param[in] HobRaw          A pointer to the start of gUniversalPayloadPciRootBridgeInfoGuid HOB.\r
+  @param[in] HobLength       The size of the HOB data buffer.\r
 \r
   @retval EFI_SUCCESS        If it completed successfully.\r
 **/\r
@@ -362,6 +373,8 @@ PrintPciRootBridgeInfoGuidHob (
 /**\r
   Print the information in Extra Data Guid Hob.\r
   @param[in]  HobRaw         A pointer to the start of gUniversalPayloadExtraDataGuid HOB.\r
+  @param[in] HobLength       The size of the HOB data buffer.\r
+\r
   @retval EFI_SUCCESS        If it completed successfully.\r
 **/\r
 EFI_STATUS\r
@@ -394,6 +407,8 @@ PrintExtraDataGuidHob (
 /**\r
   Print the information in MemoryTypeInfoGuidHob.\r
   @param[in] HobRaw          A pointer to the start of gEfiMemoryTypeInformationGuid HOB.\r
+  @param[in] HobLength       The size of the HOB data buffer.\r
+\r
   @retval EFI_SUCCESS        If it completed successfully.\r
 **/\r
 EFI_STATUS\r
@@ -414,7 +429,7 @@ PrintMemoryTypeInfoGuidHob (
 /**\r
   Print the information in EdkiiBootManagerMenuFileGuid.\r
   @param[in] HobRaw          A pointer to the start of gEdkiiBootManagerMenuFileGuid HOB.\r
-  @param[in] HobLength       The size of the data buffer.\r
+  @param[in] HobLength       The size of the HOB data buffer.\r
   @retval EFI_SUCCESS        If it completed successfully.\r
 **/\r
 EFI_STATUS\r
index 3646da2ba53050d976462ea377afc8816d24cf95..00db65c2f0005965441d2234c46d3257ec8c639e 100644 (file)
@@ -389,6 +389,8 @@ BuildGenericHob (
 /**\r
   Entry point to the C language phase of UEFI payload.\r
 \r
+  @param[in]   BootloaderParameter    The starting address of bootloader parameter block.\r
+\r
   @retval      It will not return if SUCCESS, and return error when passing bootloader parameter.\r
 **/\r
 EFI_STATUS\r
index de51c2fba9d3f5a3352745f5625dd6016e859ef3..637ed9c20b415b1242fb73be18a1a021d6884019 100644 (file)
@@ -1,9 +1,9 @@
 /** @file\r
-*\r
-* Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>\r
-*\r
-*  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-*\r
+\r
+  Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>\r
+\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
 **/\r
 \r
 #ifndef __UEFI_PAYLOAD_ENTRY_H__\r
index 7e67cf0f040d32aee18d8c843b5bf1ba127c87eb..4d1096b323215fdb591a4e1588d127961a42edb6 100644 (file)
@@ -114,18 +114,19 @@ AddNewHob (
 }\r
 \r
 /**\r
-  Found the Resource Descriptor HOB that contains a range\r
+  Found the Resource Descriptor HOB that contains a range (Base, Top)\r
 \r
+  @param[in] HobList    Hob start address\r
   @param[in] Base       Memory start address\r
-  @param[in] Top        Memory Top.\r
+  @param[in] Top        Memory end address.\r
 \r
-  @return     The pointer to the Resource Descriptor HOB.\r
+  @retval     The pointer to the Resource Descriptor HOB.\r
 **/\r
 EFI_HOB_RESOURCE_DESCRIPTOR *\r
 FindResourceDescriptorByRange (\r
-  VOID                      *HobList,\r
-  EFI_PHYSICAL_ADDRESS      Base,\r
-  EFI_PHYSICAL_ADDRESS      Top\r
+  IN VOID                      *HobList,\r
+  IN EFI_PHYSICAL_ADDRESS      Base,\r
+  IN EFI_PHYSICAL_ADDRESS      Top\r
   )\r
 {\r
   EFI_PEI_HOB_POINTERS             Hob;\r
@@ -171,7 +172,7 @@ FindResourceDescriptorByRange (
   @param[in] MinimalNeededSize       Minimal needed size.\r
   @param[in] ExceptResourceHob       Ignore this Resource Descriptor.\r
 \r
-  @return     The pointer to the Resource Descriptor HOB.\r
+  @retval     The pointer to the Resource Descriptor HOB.\r
 **/\r
 EFI_HOB_RESOURCE_DESCRIPTOR *\r
 FindAnotherHighestBelow4GResourceDescriptor (\r
@@ -240,6 +241,9 @@ FindAnotherHighestBelow4GResourceDescriptor (
 /**\r
   It will build HOBs based on information from bootloaders.\r
 \r
+  @param[in]  BootloaderParameter   The starting memory address of bootloader parameter block.\r
+  @param[out] DxeFv                 The pointer to the DXE FV in memory.\r
+\r
   @retval EFI_SUCCESS        If it completed successfully.\r
   @retval Others             If it failed to build required HOBs.\r
 **/\r
@@ -376,6 +380,8 @@ BuildHobs (
 /**\r
   Entry point to the C language phase of UEFI payload.\r
 \r
+  @param[in]   BootloaderParameter    The starting address of bootloader parameter block.\r
+\r
   @retval      It will not return if SUCCESS, and return error when passing bootloader parameter.\r
 **/\r
 EFI_STATUS\r