]> git.proxmox.com Git - mirror_edk2.git/commitdiff
clean the codes according to review comments.
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 3 Sep 2008 07:54:27 +0000 (07:54 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 3 Sep 2008 07:54:27 +0000 (07:54 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5789 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/BasePalCallLibNull/BasePalCallLibNull.inf
MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
MdePkg/Library/BasePcdLibNull/PcdLib.c
MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
MdePkg/Library/BasePeCoffGetEntryPointLib/PeCoffGetEntryPoint.c
MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDebug.inf
MdePkg/Library/BasePostCodeLibDebug/PostCode.c
MdePkg/Library/BasePostCodeLibPort80/PostCode.c

index 8de1890eb127661aecc98419eb72a6a12fa35e9c..5a90aa23a49ceb096da0c0a269a69766fa2c0db2 100644 (file)
@@ -1,8 +1,8 @@
 #/** @file\r
-# Component description file for NULL Debug Library\r
+# Component description file for NULL PalCall Library.\r
 #\r
-# Debug Library with empty functions.\r
-# Copyright (c) 2007, Intel Corporation.\r
+# PalCall Library with empty functions.\r
+# Copyright (c) 2007 - 2008, Intel Corporation.\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
index 81364bae6b236d5130f8381b3839f5c1d7362a80..e7a9620fb8b3d4e44cb20e9a0743fe481a36f421 100644 (file)
@@ -1,7 +1,7 @@
 #/** @file\r
-# Component description file for NULL PCD Library\r
+# Component description file for NULL PCD Library.\r
 #\r
-# Copyright (c) 2007, Intel Corporation.\r
+# Copyright (c) 2007 - 2008, Intel Corporation.\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -35,7 +35,6 @@
   DebugLib\r
   BaseMemoryLib\r
 \r
-\r
 [Packages]\r
   MdePkg/MdePkg.dec\r
 \r
index ef285ea80f8867ef83e747e71a6d9cdedbdf1a9d..77fb1e5c38a5f6fd430ddff29818acabdc22c62e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   A emptry template implementation of PCD Library.\r
 \r
-  Copyright (c) 2006, Intel Corporation\r
+  Copyright (c) 2006 - 2008, Intel Corporation\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,7 +12,8 @@
 \r
 **/\r
 \r
-#include <PiPei.h>\r
+#include <Base.h>\r
+\r
 #include <Library/DebugLib.h>\r
 #include <Library/PcdLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
@@ -33,7 +34,7 @@ LibPcdSetSku (
   IN UINTN  SkuId\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -52,7 +53,7 @@ LibPcdGet8 (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -73,7 +74,7 @@ LibPcdGet16 (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -94,7 +95,7 @@ LibPcdGet32 (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -115,7 +116,7 @@ LibPcdGet64 (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -136,7 +137,7 @@ LibPcdGetPtr (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -157,7 +158,7 @@ LibPcdGetBool (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -178,7 +179,7 @@ LibPcdGetSize (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -203,7 +204,7 @@ LibPcdGetEx8 (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -228,7 +229,7 @@ LibPcdGetEx16 (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -253,7 +254,7 @@ LibPcdGetEx32 (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -278,7 +279,7 @@ LibPcdGetEx64 (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -303,7 +304,7 @@ LibPcdGetExPtr (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -328,7 +329,7 @@ LibPcdGetExBool (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -353,7 +354,7 @@ LibPcdGetExSize (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -377,7 +378,7 @@ LibPcdSet8 (
   IN UINT8             Value\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -401,7 +402,7 @@ LibPcdSet16 (
   IN UINT16            Value\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -425,7 +426,7 @@ LibPcdSet32 (
   IN UINT32             Value\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -449,7 +450,7 @@ LibPcdSet64 (
   IN UINT64             Value\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -485,7 +486,7 @@ LibPcdSetPtr (
   IN      VOID              *Buffer\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return NULL;\r
 }\r
@@ -509,7 +510,7 @@ LibPcdSetBool (
   IN BOOLEAN           Value\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return FALSE;\r
 }\r
@@ -537,7 +538,7 @@ LibPcdSetEx8 (
   IN UINT8             Value\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -565,7 +566,7 @@ LibPcdSetEx16 (
   IN UINT16            Value\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -593,7 +594,7 @@ LibPcdSetEx32 (
   IN UINT32            Value\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -621,7 +622,7 @@ LibPcdSetEx64 (
   IN UINT64            Value\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -655,7 +656,7 @@ LibPcdSetExPtr (
   IN      VOID              *Buffer\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return NULL;\r
 }\r
@@ -683,7 +684,7 @@ LibPcdSetExBool (
   IN BOOLEAN           Value\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return FALSE;\r
 }\r
@@ -714,7 +715,7 @@ LibPcdCallbackOnSet (
   IN PCD_CALLBACK             NotificationFunction\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 }\r
 \r
 \r
@@ -738,7 +739,7 @@ LibPcdCancelCallback (
   IN PCD_CALLBACK             NotificationFunction\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 }\r
 \r
 \r
@@ -766,7 +767,7 @@ LibPcdGetNextToken (
   IN       UINTN              TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -796,7 +797,7 @@ LibPcdGetNextTokenSpace (
   IN CONST GUID  *Guid\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return NULL;\r
 }\r
index 4c7e4dcaaf4b54caf5145408f6fdcd51c296a4b8..9ecdc5b87d3d8ebc587886834e9f94535784d520 100644 (file)
@@ -1,8 +1,8 @@
 #/** @file\r
-# Component description file Base PE/Coff Get Entry Point Library\r
+# Component description file Base PE/Coff Get Entry Point Library.\r
 #\r
 # PE/COFF Entry Point Library implementation.\r
-# Copyright (c) 2007, Intel Corporation.\r
+# Copyright (c) 2007 - 2008, Intel Corporation.\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
index 36370ba4f71f458c075a797631467eeb3fd9e46d..82d67e057a19f99fdaa6be51e54eec49fb4432d1 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Tiano PE/COFF loader.\r
-\r
-  Copyright (c) 2006 - 2007, Intel Corporation<BR>\r
+  Provides the services to get the entry point to a PE/COFF image that has either been \r
+  loaded into memory or is executing at it¡¯s linked address\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -15,7 +15,6 @@
 \r
 #include <Base.h>\r
 \r
-\r
 #include <Library/PeCoffGetEntryPointLib.h>\r
 #include <Library/DebugLib.h>\r
 \r
@@ -52,7 +51,7 @@ PeCoffLoaderGetEntryPoint (
   ASSERT (EntryPoint != NULL);\r
 \r
   DosHdr = (EFI_IMAGE_DOS_HEADER *)Pe32Data;\r
-  if (EFI_IMAGE_DOS_SIGNATURE == DosHdr->e_magic) {\r
+  if (DosHdr->e_magic == EFI_IMAGE_DOS_SIGNATURE) {\r
     //\r
     // DOS image header is present, so read the PE header after the DOS image header.\r
     //\r
@@ -104,7 +103,7 @@ PeCoffLoaderGetMachineType (
   ASSERT (Pe32Data != NULL);\r
 \r
   DosHdr = (EFI_IMAGE_DOS_HEADER *)Pe32Data;\r
-  if (EFI_IMAGE_DOS_SIGNATURE == DosHdr->e_magic) {\r
+  if (DosHdr->e_magic == EFI_IMAGE_DOS_SIGNATURE) {\r
     //\r
     // DOS image header is present, so read the PE header after the DOS image header.\r
     //\r
@@ -116,9 +115,9 @@ PeCoffLoaderGetMachineType (
     Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)Pe32Data;\r
   }\r
 \r
-  if (EFI_TE_IMAGE_HEADER_SIGNATURE == Hdr.Te->Signature) {\r
+  if (Hdr.Te->Signature == EFI_TE_IMAGE_HEADER_SIGNATURE) {\r
     return Hdr.Te->Machine;\r
-  } else if (EFI_IMAGE_NT_SIGNATURE == Hdr.Pe32->Signature)  {\r
+  } else if (Hdr.Pe32->Signature == EFI_IMAGE_NT_SIGNATURE)  {\r
     return Hdr.Pe32->FileHeader.Machine;\r
   }\r
 \r
@@ -168,7 +167,7 @@ PeCoffLoaderGetPdbPointer (
   NumberOfRvaAndSizes = 0;\r
 \r
   DosHdr = (EFI_IMAGE_DOS_HEADER *)Pe32Data;\r
-  if (EFI_IMAGE_DOS_SIGNATURE == DosHdr->e_magic) {\r
+  if (DosHdr->e_magic == EFI_IMAGE_DOS_SIGNATURE) {\r
     //\r
     // DOS image header is present, so read the PE header after the DOS image header.\r
     //\r
@@ -180,7 +179,7 @@ PeCoffLoaderGetPdbPointer (
     Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)Pe32Data;\r
   }\r
 \r
-  if (EFI_TE_IMAGE_HEADER_SIGNATURE == Hdr.Te->Signature) {\r
+  if (Hdr.Te->Signature == EFI_TE_IMAGE_HEADER_SIGNATURE) {\r
     if (Hdr.Te->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG].VirtualAddress != 0) {\r
       DirectoryEntry  = &Hdr.Te->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG];\r
       TEImageAdjust   = sizeof (EFI_TE_IMAGE_HEADER) - Hdr.Te->StrippedSize;\r
@@ -188,7 +187,7 @@ PeCoffLoaderGetPdbPointer (
                     Hdr.Te->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG].VirtualAddress +\r
                     TEImageAdjust);\r
     }\r
-  } else if (EFI_IMAGE_NT_SIGNATURE == Hdr.Pe32->Signature) {\r
+  } else if (Hdr.Pe32->Signature == EFI_IMAGE_NT_SIGNATURE) {\r
     //\r
     // NOTE: We use Machine field to identify PE32/PE32+, instead of Magic.\r
     //       It is due to backward-compatibility, for some system might\r
@@ -215,7 +214,7 @@ PeCoffLoaderGetPdbPointer (
       Magic = Hdr.Pe32->OptionalHeader.Magic;\r
     }\r
 \r
-    if (EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC == Magic) {\r
+    if (Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {\r
       //\r
       // Use PE32 offset get Debug Directory Entry\r
       //\r
@@ -239,7 +238,7 @@ PeCoffLoaderGetPdbPointer (
     return NULL;\r
   }\r
 \r
-  if (NULL == DebugEntry || NULL == DirectoryEntry) {\r
+  if (DebugEntry == NULL || DirectoryEntry == NULL) {\r
     return NULL;\r
   }\r
 \r
index d915130c65d3ea95e2627c8932e3d9b5ea4c8380..64553ec54b3c61d231322e6601c81539f4bddf2b 100644 (file)
@@ -1,6 +1,7 @@
 #/** @file\r
+# Component description file Post Code Library.\r
 #\r
-# Post Code Library that layers on top of a Debug Library instance.\r
+# The instance of Post Code Library that layers on top of a Debug Library instance.\r
 # Copyright (c) 2007 - 2008, Intel Corporation.\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
index 4335acb1aea2fff605cd960496c3fc51ecc16cb7..974adceca77daba2b8aea52af50f39564d9b99e0 100644 (file)
@@ -1,5 +1,5 @@
 /** @file\r
-  Base Post Code Library instance based on Debug Library.\r
+  The instance of Post Code Library that layers on top of a Debug Library instance.\r
 \r
   Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
   All rights reserved. This program and the accompanying materials                          \r
 \r
 **/\r
 \r
-\r
-\r
 #include <Base.h>\r
 \r
-\r
 #include <Library/PostCodeLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/PcdLib.h>\r
@@ -36,7 +33,7 @@
 \r
   @param   Value  The 32-bit value to write to the POST card.\r
 \r
-  @return  Value  The 32-bit value to write to the POST card.\r
+  @return  The 32-bit value to write to the POST card.\r
 \r
 **/\r
 UINT32\r
@@ -71,7 +68,7 @@ PostCode (
                        POST code value.  This is an optional parameter that may \r
                        be NULL.\r
 \r
-  @return  Value       The 32-bit value to write to the POST card.\r
+  @return The 32-bit value to write to the POST card.\r
 \r
 **/\r
 UINT32\r
index 358c9ba1da0f66592fc10819a0f8c0beef764ea8..f47a8aba05cef559e849e296caab28c65f965bed 100644 (file)
 \r
 **/\r
 \r
-\r
-\r
 #include <Base.h>\r
 \r
-\r
 #include <Library/PostCodeLib.h>\r
 #include <Library/PcdLib.h>\r
 #include <Library/IoLib.h>\r
@@ -36,7 +33,7 @@
 \r
   @param  Value  The 32-bit value to write to the POST card.\r
 \r
-  @return  Value The 32-bit value to write to the POST card.\r
+  @return The 32-bit value to write to the POST card.\r
 \r
 **/\r
 UINT32\r
@@ -71,7 +68,7 @@ PostCode (
                        POST code value.  This is an optional parameter that may \r
                        be NULL. Ihis parameter is ignored in this implementation. \r
 \r
-  @return  Value       The 32-bit value to write to the POST card.\r
+  @return The 32-bit value to write to the POST card.\r
 \r
 **/\r
 UINT32\r