summaryrefslogtreecommitdiff
path: root/EdkModulePkg
diff options
context:
space:
mode:
Diffstat (limited to 'EdkModulePkg')
-rw-r--r--EdkModulePkg/Bus/Pci/Ehci/Dxe/Ehci.h6
-rw-r--r--EdkModulePkg/Bus/Pci/PciBus/Dxe/PciEnumeratorSupport.c8
-rw-r--r--EdkModulePkg/Core/Pei/Image/Image.c16
3 files changed, 21 insertions, 9 deletions
diff --git a/EdkModulePkg/Bus/Pci/Ehci/Dxe/Ehci.h b/EdkModulePkg/Bus/Pci/Ehci/Dxe/Ehci.h
index dcf3e56..7ac5d28 100644
--- a/EdkModulePkg/Bus/Pci/Ehci/Dxe/Ehci.h
+++ b/EdkModulePkg/Bus/Pci/Ehci/Dxe/Ehci.h
@@ -1,11 +1,11 @@
/*++
-Copyright (c) 2006, Intel Corporation
+Copyright (c) 2006 - 2007, 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
http://opensource.org/licenses/bsd-license.php
-
+
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@@ -189,7 +189,7 @@ extern EFI_COMPONENT_NAME_PROTOCOL gEhciComponentName;
//
// USB Base Class Code,Sub-Class Code and Programming Interface
//
-#define PCI_CLASSC_PI_EHCI 0x20
+#define PCI_CLASSC_PI_EHCI PCI_IF_EHCI
#define SETUP_PACKET_ID 0x2D
#define INPUT_PACKET_ID 0x69
diff --git a/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciEnumeratorSupport.c b/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciEnumeratorSupport.c
index 3b796a6..0403402 100644
--- a/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciEnumeratorSupport.c
+++ b/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciEnumeratorSupport.c
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 2006, Intel Corporation
+Copyright (c) 2006 - 2007, 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
@@ -255,8 +255,8 @@ Returns:
Device,
Func
);
- if (gFullEnumeration) {
- InitializeP2C (PciIoDevice);
+ if ((PciIoDevice != NULL) && gFullEnumeration) {
+ InitializeP2C (PciIoDevice);
}
} else {
@@ -289,7 +289,7 @@ Returns:
//
// Special initialization for PPB including making the PPB quiet
//
- if (gFullEnumeration) {
+ if ((PciIoDevice != NULL) && gFullEnumeration) {
InitializePpb (PciIoDevice);
}
}
diff --git a/EdkModulePkg/Core/Pei/Image/Image.c b/EdkModulePkg/Core/Pei/Image/Image.c
index dfe4668..2029368 100644
--- a/EdkModulePkg/Core/Pei/Image/Image.c
+++ b/EdkModulePkg/Core/Pei/Image/Image.c
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 2006, Intel Corporation
+Copyright (c) 2006 - 2007, 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
@@ -56,6 +56,7 @@ Returns:
UINT64 ImageSize;
EFI_PHYSICAL_ADDRESS ImageEntryPoint;
EFI_TE_IMAGE_HEADER *TEImageHeader;
+ UINT16 Machine;
*EntryPoint = NULL;
TEImageHeader = NULL;
@@ -114,7 +115,7 @@ Returns:
// Retrieve the entry point from the TE image header
//
ImageAddress = (EFI_PHYSICAL_ADDRESS) (UINTN) TEImageHeader;
- *EntryPoint = (VOID *)((UINTN) TEImageHeader + sizeof (EFI_TE_IMAGE_HEADER) +
+ *EntryPoint = (VOID *)((UINTN) TEImageHeader + sizeof (EFI_TE_IMAGE_HEADER) +
TEImageHeader->AddressOfEntryPoint - TEImageHeader->StrippedSize);
}
} else {
@@ -128,6 +129,17 @@ Returns:
}
}
+ if (((EFI_TE_IMAGE_HEADER *) (UINTN) ImageAddress)->Signature == EFI_TE_IMAGE_HEADER_SIGNATURE) {
+ TEImageHeader = (EFI_TE_IMAGE_HEADER *) (UINTN) ImageAddress;
+ Machine = TEImageHeader->Machine;
+ } else {
+ Machine = PeCoffLoaderGetMachineType (Pe32Data);
+ }
+
+ if (!EFI_IMAGE_MACHINE_TYPE_SUPPORTED (Machine)) {
+ return EFI_UNSUPPORTED;
+ }
+
//
// Print debug message: Loading PEIM at 0x12345678 EntryPoint=0x12345688 Driver.efi
//