UefiPayloadPkg: Fix ECC reported issues

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>
This commit is contained in:
Guo Dong
2021-10-15 12:10:11 -07:00
committed by mergify[bot]
parent 91a978ce7e
commit 6ef5797447
25 changed files with 98 additions and 99 deletions

View File

@@ -245,5 +245,6 @@ struct cb_cbmem_tab {
(void *)(((UINT8 *) (_rec)) + sizeof(*(_rec)) \
+ (sizeof((_rec)->map[0]) * (_idx)))
typedef struct cb_memory CB_MEMORY;
#endif // _COREBOOT_PEI_H_INCLUDED_

View File

@@ -6,8 +6,8 @@
**/
#ifndef __ACPI_BOARD_INFO_GUID_H__
#define __ACPI_BOARD_INFO_GUID_H__
#ifndef ACPI_BOARD_INFO_GUID_H_
#define ACPI_BOARD_INFO_GUID_H_
///
/// Board information GUID

View File

@@ -6,8 +6,8 @@
**/
#ifndef __MEMORY_MAP_INFO_GUID_H__
#define __MEMORY_MAP_INFO_GUID_H__
#ifndef MEMORY_MAP_INFO_GUID_H_
#define MEMORY_MAP_INFO_GUID_H_
#include <Library/PcdLib.h>

View File

@@ -6,8 +6,8 @@
**/
#ifndef __SERIAL_PORT_INFO_GUID_H__
#define __SERIAL_PORT_INFO_GUID_H__
#ifndef SERIAL_PORT_INFO_GUID_H_
#define SERIAL_PORT_INFO_GUID_H_
///
/// Serial Port Information GUID

View File

@@ -6,8 +6,8 @@
**/
#ifndef __SYSTEM_TABLE_INFO_GUID_H__
#define __SYSTEM_TABLE_INFO_GUID_H__
#ifndef SYSTEM_TABLE_INFO_GUID_H_
#define SYSTEM_TABLE_INFO_GUID_H_
///
/// System Table Information GUID

View File

@@ -6,6 +6,9 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef BOOTLOADER_PARSE_LIB_
#define BOOTLOADER_PARSE_LIB_
#include <PiPei.h>
#include <Guid/GraphicsInfoHob.h>
#include <Guid/MemoryMapInfoGuid.h>
@@ -13,9 +16,6 @@
#include <Guid/SystemTableInfoGuid.h>
#include <Guid/AcpiBoardInfoGuid.h>
#ifndef __BOOTLOADER_PARSE_LIB__
#define __BOOTLOADER_PARSE_LIB__
#define GET_BOOTLOADER_PARAMETER() PcdGet64 (PcdBootloaderParameter)
typedef RETURN_STATUS \
@@ -73,7 +73,7 @@ ParseSystemTable (
/**
Find the serial port information
@param SERIAL_PORT_INFO Pointer to serial port info structure
@param SerialPortInfo Pointer to serial port info structure
@retval RETURN_SUCCESS Successfully find the serial port information.
@retval RETURN_NOT_FOUND Failed to find the serial port information .

View File

@@ -15,8 +15,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef __DXE_HOB_LIST_LIB_H__
#define __DXE_HOB_LIST_LIB_H__
#ifndef DXE_HOB_LIST_LIB_H_
#define DXE_HOB_LIST_LIB_H_
///
/// Cache copy of the start of HOB list

View File

@@ -8,8 +8,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef __BOOTLOADER_PLATFORM_SUPPORT_LIB__
#define __BOOTLOADER_PLATFORM_SUPPORT_LIB__
#ifndef BOOTLOADER_PLATFORM_SUPPORT_LIB_
#define BOOTLOADER_PLATFORM_SUPPORT_LIB_
/**
Parse platform specific information from bootloader