summaryrefslogtreecommitdiff
path: root/MdePkg
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2008-10-10 06:20:50 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2008-10-10 06:20:50 +0000
commit3ecdcd1146b8268eea8a550e883121c566a9aef8 (patch)
tree93686f11687a79a0c5b3ffde80daa8322fc678e5 /MdePkg
parenteecd469b1064cd253f0b1c666659505659f8d121 (diff)
downloadedk2-3ecdcd1146b8268eea8a550e883121c566a9aef8.zip
edk2-3ecdcd1146b8268eea8a550e883121c566a9aef8.tar.gz
edk2-3ecdcd1146b8268eea8a550e883121c566a9aef8.tar.bz2
Update HobLib and PeCoffLib according to MDE Lib Spec 0.61c
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6100 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Include/Library/HobLib.h3
-rw-r--r--MdePkg/Include/Library/PeCoffLib.h17
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf4
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf4
-rw-r--r--MdePkg/Library/BasePeCoffLib/BasePeCoff.c16
-rw-r--r--MdePkg/Library/CpuLib/CpuLib.inf2
-rw-r--r--MdePkg/Library/DxeCoreHobLib/HobLib.c3
-rw-r--r--MdePkg/Library/DxeHobLib/HobLib.c3
-rw-r--r--MdePkg/Library/PeiHobLib/HobLib.c1
9 files changed, 31 insertions, 22 deletions
diff --git a/MdePkg/Include/Library/HobLib.h b/MdePkg/Include/Library/HobLib.h
index 02f364c..ae1fb16 100644
--- a/MdePkg/Include/Library/HobLib.h
+++ b/MdePkg/Include/Library/HobLib.h
@@ -17,9 +17,10 @@
/**
Returns the pointer to the HOB list.
+ ASSERT() if the HOB list returned by GetHobList() is NULL.
This function returns the pointer to first HOB in the list.
-
+
@return The pointer to the HOB list.
**/
diff --git a/MdePkg/Include/Library/PeCoffLib.h b/MdePkg/Include/Library/PeCoffLib.h
index 47b70ff..2a30d84 100644
--- a/MdePkg/Include/Library/PeCoffLib.h
+++ b/MdePkg/Include/Library/PeCoffLib.h
@@ -85,6 +85,7 @@ typedef struct {
VOID *FixupData;
///
/// Is set by PeCoffLoaderGetImageInfo() to the Section Alignment in the PE/COFF header
+ /// If the image is a TE image, then this field is set to 0.
///
UINT32 SectionAlignment;
///
@@ -159,13 +160,15 @@ typedef struct {
/**
Retrieves information about a PE/COFF image.
- Computes the PeCoffHeaderOffset, ImageAddress, ImageSize, DestinationAddress, CodeView,
- PdbPointer, RelocationsStripped, SectionAlignment, SizeOfHeaders, and DebugDirectoryEntryRva
- fields of the ImageContext structure. If ImageContext is NULL, then return RETURN_INVALID_PARAMETER.
- If the PE/COFF image accessed through the ImageRead service in the ImageContext structure is not
- a supported PE/COFF image type, then return RETURN_UNSUPPORTED. If any errors occur while
- computing the fields of ImageContext, then the error status is returned in the ImageError field of
- ImageContext.
+ Computes the PeCoffHeaderOffset, IsTeImage, ImageType, ImageAddress, ImageSize,
+ DestinationAddress, RelocationsStripped, SectionAlignment, SizeOfHeaders, and
+ DebugDirectoryEntryRva fields of the ImageContext structure.
+ If ImageContext is NULL, then return RETURN_INVALID_PARAMETER.
+ If the PE/COFF image accessed through the ImageRead service in the ImageContext
+ structure is not a supported PE/COFF image type, then return RETURN_UNSUPPORTED.
+ If any errors occur while computing the fields of ImageContext,
+ then the error status is returned in the ImageError field of ImageContext.
+ If the image is a TE image, then SectionAlignment is set to 0.
@param ImageContext Pointer to the image context structure that describes the PE/COFF
image that needs to be examined by this function.
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf b/MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf
index ad762a1..ffd2a4e 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf
@@ -1,8 +1,8 @@
#/** @file
# Component description file for Base Memory Optimization Dxe Library.
#
-# Base Memory Library that uses MMX registers for high performance.
-# Optimized for use in DXE.
+# Base Memory Library that is optimized for use in DXE phase.
+# Uses REP, MMX, XMM registers as required for best performance.
# Copyright (c) 2007 - 2008, Intel Corporation
#
# All rights reserved. This program and the accompanying materials
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf b/MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf
index 5d6f937..0144cad 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf
+++ b/MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf
@@ -1,8 +1,8 @@
#/** @file
# Component description file for Base Memory Optimization Pei Library
#
-# Base Memory Library that uses REP string instructions for
-# high performance and small size. Optimized for use in PEI.
+# Base Memory Library that is optimized for use in PEI phase.
+# Uses REP, MMX, XMM registers as required for best performance.
# Copyright (c) 2007 - 2008, Intel Corporation
#
# All rights reserved. This program and the accompanying materials
diff --git a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
index f975754..7df939d 100644
--- a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
+++ b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
@@ -172,13 +172,15 @@ PeCoffLoaderGetPeHeader (
/**
Retrieves information about a PE/COFF image.
- Computes the PeCoffHeaderOffset, ImageAddress, ImageSize, DestinationAddress, RelocationsStripped,
- SectionAlignment, SizeOfHeaders, and DebugDirectoryEntryRva fields of the ImageContext structure.
- If ImageContext is NULL, then return RETURN_INVALID_PARAMETER.
- If the PE/COFF image accessed through the ImageRead service in the ImageContext structure is not
- a supported PE/COFF image type, then return RETURN_UNSUPPORTED. If any errors occur while
- computing the fields of ImageContext, then the error status is returned in the ImageError field of
- ImageContext.
+ Computes the PeCoffHeaderOffset, IsTeImage, ImageType, ImageAddress, ImageSize,
+ DestinationAddress, RelocationsStripped, SectionAlignment, SizeOfHeaders, and
+ DebugDirectoryEntryRva fields of the ImageContext structure.
+ If ImageContext is NULL, then return RETURN_INVALID_PARAMETER.
+ If the PE/COFF image accessed through the ImageRead service in the ImageContext
+ structure is not a supported PE/COFF image type, then return RETURN_UNSUPPORTED.
+ If any errors occur while computing the fields of ImageContext,
+ then the error status is returned in the ImageError field of ImageContext.
+ If the image is a TE image, then SectionAlignment is set to 0.
@param ImageContext Pointer to the image context structure that describes the PE/COFF
image that needs to be examined by this function.
diff --git a/MdePkg/Library/CpuLib/CpuLib.inf b/MdePkg/Library/CpuLib/CpuLib.inf
index 70981a7..952983e 100644
--- a/MdePkg/Library/CpuLib/CpuLib.inf
+++ b/MdePkg/Library/CpuLib/CpuLib.inf
@@ -1,5 +1,5 @@
#/** @file
-# Component description file for Base Library
+# Component description file for Base Cpu Library
#
# Base Library implementation.
# Copyright (c) 2007, Intel Corporation.
diff --git a/MdePkg/Library/DxeCoreHobLib/HobLib.c b/MdePkg/Library/DxeCoreHobLib/HobLib.c
index b941bde..ac49551 100644
--- a/MdePkg/Library/DxeCoreHobLib/HobLib.c
+++ b/MdePkg/Library/DxeCoreHobLib/HobLib.c
@@ -23,6 +23,7 @@
/**
Returns the pointer to the HOB list.
+ ASSERT() if the HOB list returned by GetHobList() is NULL.
This function returns the pointer to first HOB in the list.
@@ -35,6 +36,7 @@ GetHobList (
VOID
)
{
+ ASSERT (gHobList != NULL);
return gHobList;
}
@@ -185,7 +187,6 @@ GetBootModeHob (
EFI_HOB_HANDOFF_INFO_TABLE *HandOffHob;
HandOffHob = (EFI_HOB_HANDOFF_INFO_TABLE *) GetHobList ();
- ASSERT (HandOffHob != NULL);
return HandOffHob->BootMode;
}
diff --git a/MdePkg/Library/DxeHobLib/HobLib.c b/MdePkg/Library/DxeHobLib/HobLib.c
index 810bfa5..d6e9e5f 100644
--- a/MdePkg/Library/DxeHobLib/HobLib.c
+++ b/MdePkg/Library/DxeHobLib/HobLib.c
@@ -56,6 +56,7 @@ HobLibConstructor (
/**
Returns the pointer to the HOB list.
+ ASSERT() if the HOB list returned by GetHobList() is NULL.
This function returns the pointer to first HOB in the list.
@@ -68,6 +69,7 @@ GetHobList (
VOID
)
{
+ ASSERT (mHobList != NULL);
return mHobList;
}
@@ -218,7 +220,6 @@ GetBootModeHob (
EFI_HOB_HANDOFF_INFO_TABLE *HandOffHob;
HandOffHob = (EFI_HOB_HANDOFF_INFO_TABLE *) GetHobList ();
- ASSERT (HandOffHob != NULL);
return HandOffHob->BootMode;
}
diff --git a/MdePkg/Library/PeiHobLib/HobLib.c b/MdePkg/Library/PeiHobLib/HobLib.c
index cbaf028..c92c6c8 100644
--- a/MdePkg/Library/PeiHobLib/HobLib.c
+++ b/MdePkg/Library/PeiHobLib/HobLib.c
@@ -24,6 +24,7 @@
/**
Returns the pointer to the HOB list.
+ ASSERT() if the HOB list returned by GetHobList() is NULL.
This function returns the pointer to first HOB in the list.