(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
\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
\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
\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
\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
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
#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
/**\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
\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
\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
)\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
//\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
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
//\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
/**\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
\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
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
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
\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
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
//\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
//\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
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
\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
-/**@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
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
-/**@file\r
+/** @file\r
Defined the platform specific device path which will be filled to\r
ConIn/ConOut variables.\r
\r
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
/**\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
\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
\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
/**\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
/**\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
/**\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
/**\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
/**\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
/**\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
/**\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
/**\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
/**\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
/** @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
}\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
@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
/**\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
/**\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