summaryrefslogtreecommitdiff
path: root/MdePkg/Library
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-05 19:30:05 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-05 19:30:05 +0000
commit4ab0dff3381de97cbecd8ec48d68c7bacfea1fb3 (patch)
tree60a841914e852640fa073189f657435e8c222931 /MdePkg/Library
parent1862ebcfffd768cd34996eeaff973a313603b775 (diff)
downloadedk2-platforms-4ab0dff3381de97cbecd8ec48d68c7bacfea1fb3.tar.xz
1) Remove UEFI specific defines from IndustryStandard/PeImage.h
2) Add UEFI specific defines to Uefi/UefiBaseType.h 3) Update Base PE/COFF related libs to only use defines from IndustryStandard/PeImage.h git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7438 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library')
-rw-r--r--MdePkg/Library/BasePeCoffGetEntryPointLib/PeCoffGetEntryPoint.c8
-rw-r--r--MdePkg/Library/BasePeCoffLib/BasePeCoff.c2
-rw-r--r--MdePkg/Library/BasePeCoffLib/Ipf/PeCoffLoaderEx.c4
-rw-r--r--MdePkg/Library/BasePeCoffLib/PeCoffLoaderEx.c4
4 files changed, 9 insertions, 9 deletions
diff --git a/MdePkg/Library/BasePeCoffGetEntryPointLib/PeCoffGetEntryPoint.c b/MdePkg/Library/BasePeCoffGetEntryPointLib/PeCoffGetEntryPoint.c
index 99873004aa..89858f05e2 100644
--- a/MdePkg/Library/BasePeCoffGetEntryPointLib/PeCoffGetEntryPoint.c
+++ b/MdePkg/Library/BasePeCoffGetEntryPointLib/PeCoffGetEntryPoint.c
@@ -195,16 +195,16 @@ PeCoffLoaderGetPdbPointer (
// generate PE32+ image with PE32 Magic.
//
switch (Hdr.Pe32->FileHeader.Machine) {
- case EFI_IMAGE_MACHINE_IA32:
+ case IMAGE_FILE_MACHINE_I386:
//
// Assume PE32 image with IA32 Machine field.
//
Magic = EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC;
break;
- case EFI_IMAGE_MACHINE_X64:
- case EFI_IMAGE_MACHINE_IPF:
+ case IMAGE_FILE_MACHINE_X64:
+ case IMAGE_FILE_MACHINE_IA64:
//
- // Assume PE32+ image with x64 or IPF Machine field
+ // Assume PE32+ image with x64 or IA64 Machine field
//
Magic = EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC;
break;
diff --git a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
index d029cc7f47..91df24e09c 100644
--- a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
+++ b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
@@ -35,7 +35,7 @@ PeCoffLoaderGetPeHeaderMagicValue (
// Magic value in the OptionalHeader is EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC
// then override the returned value to EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC
//
- if (Hdr.Pe32->FileHeader.Machine == EFI_IMAGE_MACHINE_IA64 && Hdr.Pe32->OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
+ if (Hdr.Pe32->FileHeader.Machine == IMAGE_FILE_MACHINE_IA64 && Hdr.Pe32->OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
return EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC;
}
//
diff --git a/MdePkg/Library/BasePeCoffLib/Ipf/PeCoffLoaderEx.c b/MdePkg/Library/BasePeCoffLib/Ipf/PeCoffLoaderEx.c
index cac3732722..c5d3563148 100644
--- a/MdePkg/Library/BasePeCoffLib/Ipf/PeCoffLoaderEx.c
+++ b/MdePkg/Library/BasePeCoffLib/Ipf/PeCoffLoaderEx.c
@@ -236,8 +236,8 @@ PeCoffLoaderImageFormatSupported (
IN UINT16 Machine
)
{
- if ((Machine == EFI_IMAGE_MACHINE_IPF) || (Machine == EFI_IMAGE_MACHINE_IA32) ||
- (Machine == EFI_IMAGE_MACHINE_EBC) || (Machine == EFI_IMAGE_MACHINE_X64)) {
+ if ((Machine == IMAGE_FILE_MACHINE_IA64) || (Machine == IMAGE_FILE_MACHINE_I386) ||
+ (Machine == IMAGE_FILE_MACHINE_EBC) || (Machine == IMAGE_FILE_MACHINE_X64)) {
return TRUE;
}
diff --git a/MdePkg/Library/BasePeCoffLib/PeCoffLoaderEx.c b/MdePkg/Library/BasePeCoffLib/PeCoffLoaderEx.c
index 6913a87e81..723d24e0f4 100644
--- a/MdePkg/Library/BasePeCoffLib/PeCoffLoaderEx.c
+++ b/MdePkg/Library/BasePeCoffLib/PeCoffLoaderEx.c
@@ -54,8 +54,8 @@ PeCoffLoaderImageFormatSupported (
IN UINT16 Machine
)
{
- if ((Machine == EFI_IMAGE_MACHINE_IA32) || (Machine == EFI_IMAGE_MACHINE_X64) ||
- (Machine == EFI_IMAGE_MACHINE_EBC)) {
+ if ((Machine == IMAGE_FILE_MACHINE_I386) || (Machine == IMAGE_FILE_MACHINE_X64) ||
+ (Machine == IMAGE_FILE_MACHINE_EBC)) {
return TRUE;
}