diff options
Diffstat (limited to 'EdkModulePkg/Bus/Pci/PciBus/Dxe/PciDriverOverride.c')
-rw-r--r-- | EdkModulePkg/Bus/Pci/PciBus/Dxe/PciDriverOverride.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciDriverOverride.c b/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciDriverOverride.c index 76c5a20784..cd2d585303 100644 --- a/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciDriverOverride.c +++ b/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciDriverOverride.c @@ -139,8 +139,6 @@ Returns: // TODO: EFI_SUCCESS - add return value to function comment
{
EFI_STATUS Status;
- EFI_IMAGE_DOS_HEADER *DosHdr;
- EFI_IMAGE_NT_HEADERS *PeHdr;
EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
PCI_DRIVER_OVERRIDE_LIST *Node;
EFI_DRIVER_OS_HANDOFF_HEADER *DriverOsHandoffHeader;
@@ -169,14 +167,7 @@ Returns: PciIoDevice->BusOverride = TRUE;
- DosHdr = (EFI_IMAGE_DOS_HEADER *) LoadedImage->ImageBase;
- if (DosHdr->e_magic != EFI_IMAGE_DOS_SIGNATURE) {
- return EFI_SUCCESS;
- }
-
- PeHdr = (EFI_IMAGE_NT_HEADERS *) ((UINTN) LoadedImage->ImageBase + DosHdr->e_lfanew);
-
- if (PeHdr->FileHeader.Machine != EFI_IMAGE_MACHINE_EBC) {
+ if (PeCoffLoaderGetMachineType ((VOID *)(UINTN)LoadedImage->ImageBase) != EFI_IMAGE_MACHINE_EBC) {
return EFI_SUCCESS;
}
|