From 96f6af14d68faa2b65368a6f779a1c3af2e7658b Mon Sep 17 00:00:00 2001 From: lgao4 Date: Mon, 15 Oct 2007 07:44:27 +0000 Subject: Remove the special logic on EFI_PCI_DEVICE_ENABLE in PciBus driver. And update drivers that use this macro. The reason is that PciIoAttributes() in PciIo.c treats EFI_PCI_DEVICE_ENABLE specially so that when EFI_PCI_DEVICE_ENABLE is passed in, only the supported bits of driver will be enabled. Now many drivers use EFI_PCI_DEVICE_ENABLE to enable PCI device even if some of them don't support some of the attributes like EFI_PCI_IO_ATTRIBUTE_MEMORY. This doesn't conform to UEFI 2.0 spec. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4115 6f19259b-4bc3-4df7-8a09-765794883524 --- IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c | 26 ++++++++++++----------- 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'IntelFrameworkModulePkg/Bus/Pci/PciBusDxe') diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c index 5a407892b0..63ab8e551a 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c @@ -1462,19 +1462,21 @@ Returns: } // // Just a trick for ENABLE attribute + // EFI_PCI_DEVICE_ENABLE is not defined in UEFI spec, which is the internal usage. + // So, this logic doesn't confrom to UEFI spec, which should be removed. // - if ((Attributes & EFI_PCI_DEVICE_ENABLE) == EFI_PCI_DEVICE_ENABLE) { - Attributes &= (PciIoDevice->Supports); - - // - // Raise the EFI_P_PC_ENABLE Status code - // - REPORT_STATUS_CODE_WITH_DEVICE_PATH ( - EFI_PROGRESS_CODE, - EFI_IO_BUS_PCI | EFI_P_PC_ENABLE, - PciIoDevice->DevicePath - ); - } + // if ((Attributes & EFI_PCI_DEVICE_ENABLE) == EFI_PCI_DEVICE_ENABLE) { + // Attributes &= (PciIoDevice->Supports); + // + // // + // // Raise the EFI_P_PC_ENABLE Status code + // // + // REPORT_STATUS_CODE_WITH_DEVICE_PATH ( + // EFI_PROGRESS_CODE, + // EFI_IO_BUS_PCI | EFI_P_PC_ENABLE, + // PciIoDevice->DevicePath + // ); + // } // // If no attributes can be supported, then return. -- cgit v1.2.3