]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update HobLib and PeCoffLib according to MDE Lib Spec 0.61c
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 10 Oct 2008 06:20:50 +0000 (06:20 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 10 Oct 2008 06:20:50 +0000 (06:20 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6100 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Library/HobLib.h
MdePkg/Include/Library/PeCoffLib.h
MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf
MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf
MdePkg/Library/BasePeCoffLib/BasePeCoff.c
MdePkg/Library/CpuLib/CpuLib.inf
MdePkg/Library/DxeCoreHobLib/HobLib.c
MdePkg/Library/DxeHobLib/HobLib.c
MdePkg/Library/PeiHobLib/HobLib.c

index 02f364ccc6bdad9873122d87a9eb5b6ee8db8b5f..ae1fb16f8845292fb8d14868658d5e38720f2a85 100644 (file)
 \r
 /**\r
   Returns the pointer to the HOB list.\r
 \r
 /**\r
   Returns the pointer to the HOB list.\r
+  ASSERT() if the HOB list returned by GetHobList() is NULL.\r
 \r
   This function returns the pointer to first HOB in the list.\r
 \r
   This function returns the pointer to first HOB in the list.\r
-\r
+  \r
   @return The pointer to the HOB list.\r
 \r
 **/\r
   @return The pointer to the HOB list.\r
 \r
 **/\r
index 47b70fff921f80d741c958f552c33b35ee362022..2a30d845ce764bf1ac1430c220f8b4d634c5bf68 100644 (file)
@@ -85,6 +85,7 @@ typedef struct {
   VOID                              *FixupData;\r
   ///\r
   /// Is set by PeCoffLoaderGetImageInfo() to the Section Alignment in the PE/COFF header\r
   VOID                              *FixupData;\r
   ///\r
   /// Is set by PeCoffLoaderGetImageInfo() to the Section Alignment in the PE/COFF header\r
+  /// If the image is a TE image, then this field is set to 0.\r
   ///\r
   UINT32                            SectionAlignment;\r
   ///\r
   ///\r
   UINT32                            SectionAlignment;\r
   ///\r
@@ -159,13 +160,15 @@ typedef struct {
 /**\r
   Retrieves information about a PE/COFF image.\r
 \r
 /**\r
   Retrieves information about a PE/COFF image.\r
 \r
-  Computes the PeCoffHeaderOffset, ImageAddress, ImageSize, DestinationAddress, CodeView,\r
-  PdbPointer, RelocationsStripped, SectionAlignment, SizeOfHeaders, and DebugDirectoryEntryRva\r
-  fields of the ImageContext structure.  If ImageContext is NULL, then return RETURN_INVALID_PARAMETER.\r
-  If the PE/COFF image accessed through the ImageRead service in the ImageContext structure is not\r
-  a supported PE/COFF image type, then return RETURN_UNSUPPORTED.  If any errors occur while\r
-  computing the fields of ImageContext, then the error status is returned in the ImageError field of\r
-  ImageContext. \r
+  Computes the PeCoffHeaderOffset, IsTeImage, ImageType, ImageAddress, ImageSize, \r
+  DestinationAddress, RelocationsStripped, SectionAlignment, SizeOfHeaders, and \r
+  DebugDirectoryEntryRva fields of the ImageContext structure.  \r
+  If ImageContext is NULL, then return RETURN_INVALID_PARAMETER.  \r
+  If the PE/COFF image accessed through the ImageRead service in the ImageContext \r
+  structure is not a supported PE/COFF image type, then return RETURN_UNSUPPORTED.  \r
+  If any errors occur while computing the fields of ImageContext, \r
+  then the error status is returned in the ImageError field of ImageContext.  \r
+  If the image is a TE image, then SectionAlignment is set to 0.\r
 \r
   @param  ImageContext              Pointer to the image context structure that describes the PE/COFF\r
                                     image that needs to be examined by this function.\r
 \r
   @param  ImageContext              Pointer to the image context structure that describes the PE/COFF\r
                                     image that needs to be examined by this function.\r
index ad762a1591329befcea5844789c4192856a21228..ffd2a4ec7999cc406fd831939db585c70b86abd3 100644 (file)
@@ -1,8 +1,8 @@
 #/** @file\r
 # Component description file for Base Memory Optimization Dxe Library.\r
 #\r
 #/** @file\r
 # Component description file for Base Memory Optimization Dxe Library.\r
 #\r
-# Base Memory Library that uses MMX registers for high performance.\r
-#  Optimized for use in DXE.\r
+# Base Memory Library that is optimized for use in DXE phase.  \r
+# Uses REP, MMX, XMM registers as required for best performance.\r
 # Copyright (c) 2007 - 2008, Intel Corporation\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
 # Copyright (c) 2007 - 2008, Intel Corporation\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
index 5d6f9372b4a610260e53bf6e71f4be39e41b4e64..0144caddb8c73d3e19f43349d5eec8643cd2eed4 100644 (file)
@@ -1,8 +1,8 @@
 #/** @file\r
 # Component description file for Base Memory Optimization Pei Library\r
 #\r
 #/** @file\r
 # Component description file for Base Memory Optimization Pei Library\r
 #\r
-# Base Memory Library that uses REP string instructions for\r
-#  high performance and small size. Optimized for use in PEI.\r
+# Base Memory Library that is optimized for use in PEI phase.  \r
+# Uses REP, MMX, XMM registers as required for best performance.\r
 # Copyright (c) 2007 - 2008, Intel Corporation\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
 # Copyright (c) 2007 - 2008, Intel Corporation\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
index f975754516eb6570e22baf59425e36bb44b34e49..7df939d7580a1f2cedc62e62e898e1c01c5c87e8 100644 (file)
@@ -172,13 +172,15 @@ PeCoffLoaderGetPeHeader (
 /**\r
   Retrieves information about a PE/COFF image.\r
 \r
 /**\r
   Retrieves information about a PE/COFF image.\r
 \r
-  Computes the PeCoffHeaderOffset, ImageAddress, ImageSize, DestinationAddress, RelocationsStripped, \r
-  SectionAlignment, SizeOfHeaders, and DebugDirectoryEntryRva fields of the ImageContext structure. \r
-  If ImageContext is NULL, then return RETURN_INVALID_PARAMETER.\r
-  If the PE/COFF image accessed through the ImageRead service in the ImageContext structure is not\r
-  a supported PE/COFF image type, then return RETURN_UNSUPPORTED.  If any errors occur while\r
-  computing the fields of ImageContext, then the error status is returned in the ImageError field of\r
-  ImageContext.\r
+  Computes the PeCoffHeaderOffset, IsTeImage, ImageType, ImageAddress, ImageSize, \r
+  DestinationAddress, RelocationsStripped, SectionAlignment, SizeOfHeaders, and \r
+  DebugDirectoryEntryRva fields of the ImageContext structure.  \r
+  If ImageContext is NULL, then return RETURN_INVALID_PARAMETER.  \r
+  If the PE/COFF image accessed through the ImageRead service in the ImageContext \r
+  structure is not a supported PE/COFF image type, then return RETURN_UNSUPPORTED.  \r
+  If any errors occur while computing the fields of ImageContext, \r
+  then the error status is returned in the ImageError field of ImageContext.  \r
+  If the image is a TE image, then SectionAlignment is set to 0.\r
 \r
   @param  ImageContext              Pointer to the image context structure that describes the PE/COFF\r
                                     image that needs to be examined by this function.\r
 \r
   @param  ImageContext              Pointer to the image context structure that describes the PE/COFF\r
                                     image that needs to be examined by this function.\r
index 70981a780a0c8280a374ec4e3500b3891dbb8b11..952983e7dc81e2d7af684fb4b79103af2a004ff4 100644 (file)
@@ -1,5 +1,5 @@
 #/** @file\r
 #/** @file\r
-# Component description file for Base Library\r
+# Component description file for Base Cpu Library\r
 #\r
 # Base Library implementation.\r
 # Copyright (c) 2007, Intel Corporation.\r
 #\r
 # Base Library implementation.\r
 # Copyright (c) 2007, Intel Corporation.\r
index b941bde19ccb1a9e12390604c87b63f53e755cb3..ac4955149fa58e5e7b3cba4b55928dd95b2129fb 100644 (file)
@@ -23,6 +23,7 @@
 \r
 /**\r
   Returns the pointer to the HOB list.\r
 \r
 /**\r
   Returns the pointer to the HOB list.\r
+  ASSERT() if the HOB list returned by GetHobList() is NULL.\r
 \r
   This function returns the pointer to first HOB in the list.\r
 \r
 \r
   This function returns the pointer to first HOB in the list.\r
 \r
@@ -35,6 +36,7 @@ GetHobList (
   VOID\r
   )\r
 {\r
   VOID\r
   )\r
 {\r
+       ASSERT (gHobList != NULL);\r
   return gHobList;\r
 }\r
 \r
   return gHobList;\r
 }\r
 \r
@@ -185,7 +187,6 @@ GetBootModeHob (
   EFI_HOB_HANDOFF_INFO_TABLE    *HandOffHob;\r
 \r
   HandOffHob = (EFI_HOB_HANDOFF_INFO_TABLE *) GetHobList ();\r
   EFI_HOB_HANDOFF_INFO_TABLE    *HandOffHob;\r
 \r
   HandOffHob = (EFI_HOB_HANDOFF_INFO_TABLE *) GetHobList ();\r
-  ASSERT (HandOffHob != NULL);\r
 \r
   return  HandOffHob->BootMode;\r
 }\r
 \r
   return  HandOffHob->BootMode;\r
 }\r
index 810bfa5fbf1d07a4ac151a7940f78c61d61ffa68..d6e9e5fed699ac0460eb14a6dae925baab73124e 100644 (file)
@@ -56,6 +56,7 @@ HobLibConstructor (
 \r
 /**\r
   Returns the pointer to the HOB list.\r
 \r
 /**\r
   Returns the pointer to the HOB list.\r
+  ASSERT() if the HOB list returned by GetHobList() is NULL.\r
 \r
   This function returns the pointer to first HOB in the list.\r
 \r
 \r
   This function returns the pointer to first HOB in the list.\r
 \r
@@ -68,6 +69,7 @@ GetHobList (
   VOID\r
   )\r
 {\r
   VOID\r
   )\r
 {\r
+       ASSERT (mHobList != NULL);\r
   return mHobList;\r
 }\r
 \r
   return mHobList;\r
 }\r
 \r
@@ -218,7 +220,6 @@ GetBootModeHob (
   EFI_HOB_HANDOFF_INFO_TABLE    *HandOffHob;\r
 \r
   HandOffHob = (EFI_HOB_HANDOFF_INFO_TABLE *) GetHobList ();\r
   EFI_HOB_HANDOFF_INFO_TABLE    *HandOffHob;\r
 \r
   HandOffHob = (EFI_HOB_HANDOFF_INFO_TABLE *) GetHobList ();\r
-  ASSERT (HandOffHob != NULL);\r
 \r
   return  HandOffHob->BootMode;\r
 }\r
 \r
   return  HandOffHob->BootMode;\r
 }\r
index cbaf02896370e1a39d3379b5534d62fb6e222509..c92c6c805fc5542afcb5afe8e78fbaf48b5a630d 100644 (file)
@@ -24,6 +24,7 @@
 \r
 /**\r
   Returns the pointer to the HOB list.\r
 \r
 /**\r
   Returns the pointer to the HOB list.\r
+  ASSERT() if the HOB list returned by GetHobList() is NULL.\r
 \r
   This function returns the pointer to first HOB in the list.\r
 \r
 \r
   This function returns the pointer to first HOB in the list.\r
 \r