mirror of https://github.com/acidanthera/audk.git
clean the codes according to review comments.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5789 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
bb347ec275
commit
afa223265a
|
@ -1,8 +1,8 @@
|
|||
#/** @file
|
||||
# Component description file for NULL Debug Library
|
||||
# Component description file for NULL PalCall Library.
|
||||
#
|
||||
# Debug Library with empty functions.
|
||||
# Copyright (c) 2007, Intel Corporation.
|
||||
# PalCall Library with empty functions.
|
||||
# Copyright (c) 2007 - 2008, 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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#/** @file
|
||||
# Component description file for NULL PCD Library
|
||||
# Component description file for NULL PCD Library.
|
||||
#
|
||||
# Copyright (c) 2007, Intel Corporation.
|
||||
# Copyright (c) 2007 - 2008, 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
|
||||
|
@ -35,7 +35,6 @@
|
|||
DebugLib
|
||||
BaseMemoryLib
|
||||
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
A emptry template implementation of PCD Library.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2008, 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
|
||||
|
@ -12,7 +12,8 @@
|
|||
|
||||
**/
|
||||
|
||||
#include <PiPei.h>
|
||||
#include <Base.h>
|
||||
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
|
@ -33,7 +34,7 @@ LibPcdSetSku (
|
|||
IN UINTN SkuId
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -52,7 +53,7 @@ LibPcdGet8 (
|
|||
IN UINTN TokenNumber
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -73,7 +74,7 @@ LibPcdGet16 (
|
|||
IN UINTN TokenNumber
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -94,7 +95,7 @@ LibPcdGet32 (
|
|||
IN UINTN TokenNumber
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -115,7 +116,7 @@ LibPcdGet64 (
|
|||
IN UINTN TokenNumber
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -136,7 +137,7 @@ LibPcdGetPtr (
|
|||
IN UINTN TokenNumber
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -157,7 +158,7 @@ LibPcdGetBool (
|
|||
IN UINTN TokenNumber
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -178,7 +179,7 @@ LibPcdGetSize (
|
|||
IN UINTN TokenNumber
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -203,7 +204,7 @@ LibPcdGetEx8 (
|
|||
IN UINTN TokenNumber
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -228,7 +229,7 @@ LibPcdGetEx16 (
|
|||
IN UINTN TokenNumber
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -253,7 +254,7 @@ LibPcdGetEx32 (
|
|||
IN UINTN TokenNumber
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -278,7 +279,7 @@ LibPcdGetEx64 (
|
|||
IN UINTN TokenNumber
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -303,7 +304,7 @@ LibPcdGetExPtr (
|
|||
IN UINTN TokenNumber
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -328,7 +329,7 @@ LibPcdGetExBool (
|
|||
IN UINTN TokenNumber
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -353,7 +354,7 @@ LibPcdGetExSize (
|
|||
IN UINTN TokenNumber
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -377,7 +378,7 @@ LibPcdSet8 (
|
|||
IN UINT8 Value
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -401,7 +402,7 @@ LibPcdSet16 (
|
|||
IN UINT16 Value
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -425,7 +426,7 @@ LibPcdSet32 (
|
|||
IN UINT32 Value
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -449,7 +450,7 @@ LibPcdSet64 (
|
|||
IN UINT64 Value
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -485,7 +486,7 @@ LibPcdSetPtr (
|
|||
IN VOID *Buffer
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -509,7 +510,7 @@ LibPcdSetBool (
|
|||
IN BOOLEAN Value
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -537,7 +538,7 @@ LibPcdSetEx8 (
|
|||
IN UINT8 Value
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -565,7 +566,7 @@ LibPcdSetEx16 (
|
|||
IN UINT16 Value
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -593,7 +594,7 @@ LibPcdSetEx32 (
|
|||
IN UINT32 Value
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -621,7 +622,7 @@ LibPcdSetEx64 (
|
|||
IN UINT64 Value
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -655,7 +656,7 @@ LibPcdSetExPtr (
|
|||
IN VOID *Buffer
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -683,7 +684,7 @@ LibPcdSetExBool (
|
|||
IN BOOLEAN Value
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -714,7 +715,7 @@ LibPcdCallbackOnSet (
|
|||
IN PCD_CALLBACK NotificationFunction
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -738,7 +739,7 @@ LibPcdCancelCallback (
|
|||
IN PCD_CALLBACK NotificationFunction
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -766,7 +767,7 @@ LibPcdGetNextToken (
|
|||
IN UINTN TokenNumber
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -796,7 +797,7 @@ LibPcdGetNextTokenSpace (
|
|||
IN CONST GUID *Guid
|
||||
)
|
||||
{
|
||||
ASSERT_EFI_ERROR (EFI_UNSUPPORTED);
|
||||
ASSERT (FALSE);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#/** @file
|
||||
# Component description file Base PE/Coff Get Entry Point Library
|
||||
# Component description file Base PE/Coff Get Entry Point Library.
|
||||
#
|
||||
# PE/COFF Entry Point Library implementation.
|
||||
# Copyright (c) 2007, Intel Corporation.
|
||||
# Copyright (c) 2007 - 2008, 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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
Tiano PE/COFF loader.
|
||||
|
||||
Copyright (c) 2006 - 2007, Intel Corporation<BR>
|
||||
Provides the services to get the entry point to a PE/COFF image that has either been
|
||||
loaded into memory or is executing at it¡¯s linked address
|
||||
Copyright (c) 2006 - 2008, Intel Corporation<BR>
|
||||
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
|
||||
|
@ -15,7 +15,6 @@
|
|||
|
||||
#include <Base.h>
|
||||
|
||||
|
||||
#include <Library/PeCoffGetEntryPointLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
|
||||
|
@ -52,7 +51,7 @@ PeCoffLoaderGetEntryPoint (
|
|||
ASSERT (EntryPoint != NULL);
|
||||
|
||||
DosHdr = (EFI_IMAGE_DOS_HEADER *)Pe32Data;
|
||||
if (EFI_IMAGE_DOS_SIGNATURE == DosHdr->e_magic) {
|
||||
if (DosHdr->e_magic == EFI_IMAGE_DOS_SIGNATURE) {
|
||||
//
|
||||
// DOS image header is present, so read the PE header after the DOS image header.
|
||||
//
|
||||
|
@ -104,7 +103,7 @@ PeCoffLoaderGetMachineType (
|
|||
ASSERT (Pe32Data != NULL);
|
||||
|
||||
DosHdr = (EFI_IMAGE_DOS_HEADER *)Pe32Data;
|
||||
if (EFI_IMAGE_DOS_SIGNATURE == DosHdr->e_magic) {
|
||||
if (DosHdr->e_magic == EFI_IMAGE_DOS_SIGNATURE) {
|
||||
//
|
||||
// DOS image header is present, so read the PE header after the DOS image header.
|
||||
//
|
||||
|
@ -116,9 +115,9 @@ PeCoffLoaderGetMachineType (
|
|||
Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)Pe32Data;
|
||||
}
|
||||
|
||||
if (EFI_TE_IMAGE_HEADER_SIGNATURE == Hdr.Te->Signature) {
|
||||
if (Hdr.Te->Signature == EFI_TE_IMAGE_HEADER_SIGNATURE) {
|
||||
return Hdr.Te->Machine;
|
||||
} else if (EFI_IMAGE_NT_SIGNATURE == Hdr.Pe32->Signature) {
|
||||
} else if (Hdr.Pe32->Signature == EFI_IMAGE_NT_SIGNATURE) {
|
||||
return Hdr.Pe32->FileHeader.Machine;
|
||||
}
|
||||
|
||||
|
@ -168,7 +167,7 @@ PeCoffLoaderGetPdbPointer (
|
|||
NumberOfRvaAndSizes = 0;
|
||||
|
||||
DosHdr = (EFI_IMAGE_DOS_HEADER *)Pe32Data;
|
||||
if (EFI_IMAGE_DOS_SIGNATURE == DosHdr->e_magic) {
|
||||
if (DosHdr->e_magic == EFI_IMAGE_DOS_SIGNATURE) {
|
||||
//
|
||||
// DOS image header is present, so read the PE header after the DOS image header.
|
||||
//
|
||||
|
@ -180,7 +179,7 @@ PeCoffLoaderGetPdbPointer (
|
|||
Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)Pe32Data;
|
||||
}
|
||||
|
||||
if (EFI_TE_IMAGE_HEADER_SIGNATURE == Hdr.Te->Signature) {
|
||||
if (Hdr.Te->Signature == EFI_TE_IMAGE_HEADER_SIGNATURE) {
|
||||
if (Hdr.Te->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG].VirtualAddress != 0) {
|
||||
DirectoryEntry = &Hdr.Te->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG];
|
||||
TEImageAdjust = sizeof (EFI_TE_IMAGE_HEADER) - Hdr.Te->StrippedSize;
|
||||
|
@ -188,7 +187,7 @@ PeCoffLoaderGetPdbPointer (
|
|||
Hdr.Te->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG].VirtualAddress +
|
||||
TEImageAdjust);
|
||||
}
|
||||
} else if (EFI_IMAGE_NT_SIGNATURE == Hdr.Pe32->Signature) {
|
||||
} else if (Hdr.Pe32->Signature == EFI_IMAGE_NT_SIGNATURE) {
|
||||
//
|
||||
// NOTE: We use Machine field to identify PE32/PE32+, instead of Magic.
|
||||
// It is due to backward-compatibility, for some system might
|
||||
|
@ -215,7 +214,7 @@ PeCoffLoaderGetPdbPointer (
|
|||
Magic = Hdr.Pe32->OptionalHeader.Magic;
|
||||
}
|
||||
|
||||
if (EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC == Magic) {
|
||||
if (Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
|
||||
//
|
||||
// Use PE32 offset get Debug Directory Entry
|
||||
//
|
||||
|
@ -239,7 +238,7 @@ PeCoffLoaderGetPdbPointer (
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (NULL == DebugEntry || NULL == DirectoryEntry) {
|
||||
if (DebugEntry == NULL || DirectoryEntry == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#/** @file
|
||||
# Component description file Post Code Library.
|
||||
#
|
||||
# Post Code Library that layers on top of a Debug Library instance.
|
||||
# The instance of Post Code Library that layers on top of a Debug Library instance.
|
||||
# Copyright (c) 2007 - 2008, Intel Corporation.
|
||||
#
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/** @file
|
||||
Base Post Code Library instance based on Debug Library.
|
||||
The instance of Post Code Library that layers on top of a Debug Library instance.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
|
@ -12,11 +12,8 @@
|
|||
|
||||
**/
|
||||
|
||||
|
||||
|
||||
#include <Base.h>
|
||||
|
||||
|
||||
#include <Library/PostCodeLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
|
@ -36,7 +33,7 @@
|
|||
|
||||
@param Value The 32-bit value to write to the POST card.
|
||||
|
||||
@return Value The 32-bit value to write to the POST card.
|
||||
@return The 32-bit value to write to the POST card.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
|
@ -71,7 +68,7 @@ PostCode (
|
|||
POST code value. This is an optional parameter that may
|
||||
be NULL.
|
||||
|
||||
@return Value The 32-bit value to write to the POST card.
|
||||
@return The 32-bit value to write to the POST card.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
|
|
|
@ -12,11 +12,8 @@
|
|||
|
||||
**/
|
||||
|
||||
|
||||
|
||||
#include <Base.h>
|
||||
|
||||
|
||||
#include <Library/PostCodeLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
#include <Library/IoLib.h>
|
||||
|
@ -36,7 +33,7 @@
|
|||
|
||||
@param Value The 32-bit value to write to the POST card.
|
||||
|
||||
@return Value The 32-bit value to write to the POST card.
|
||||
@return The 32-bit value to write to the POST card.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
|
@ -71,7 +68,7 @@ PostCode (
|
|||
POST code value. This is an optional parameter that may
|
||||
be NULL. Ihis parameter is ignored in this implementation.
|
||||
|
||||
@return Value The 32-bit value to write to the POST card.
|
||||
@return The 32-bit value to write to the POST card.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
|
|
Loading…
Reference in New Issue