]> git.proxmox.com Git - mirror_edk2.git/commitdiff
The updating (change the Interrupt Line to 0xFF for unknown setting) is only for...
authorzliu3 <zliu3@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 12 Jan 2007 03:42:01 +0000 (03:42 +0000)
committerzliu3 <zliu3@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 12 Jan 2007 03:42:01 +0000 (03:42 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2229 6f19259b-4bc3-4df7-8a09-765794883524

EdkModulePkg/Bus/Pci/PciBus/Dxe/PciDeviceSupport.c

index df69078e77e4acc638072ba62a04c20e5d14d01e..3b495951308af6ea7a631caaf8b3c834de47f08f 100644 (file)
@@ -1,18 +1,18 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 Module Name:\r
 \r
   PciDeviceSupport.c\r
-  \r
+\r
 Abstract:\r
 \r
   This file provides routine to support Pci device node manipulation\r
@@ -119,7 +119,7 @@ DestroyRootBridge (
 \r
 Routine Description:\r
 \r
-  \r
+\r
 Arguments:\r
 \r
   RootBridge   - A pointer to the PCI_IO_DEVICE.\r
@@ -147,7 +147,7 @@ FreePciDevice (
 Routine Description:\r
 \r
   Destroy a pci device node.\r
-  Also all direct or indirect allocated resource for this node will be freed.   \r
+  Also all direct or indirect allocated resource for this node will be freed.\r
 \r
 Arguments:\r
 \r
@@ -232,7 +232,7 @@ DestroyRootBridgeByHandle (
 Routine Description:\r
 \r
   Destroy all device nodes under the root bridge\r
-  specified by Controller. \r
+  specified by Controller.\r
   The root bridge itself is also included.\r
 \r
 Arguments:\r
@@ -283,7 +283,7 @@ RegisterPciDevice (
 \r
 Routine Description:\r
 \r
-  This function registers the PCI IO device. It creates a handle for this PCI IO device \r
+  This function registers the PCI IO device. It creates a handle for this PCI IO device\r
   (if the handle does not exist), attaches appropriate protocols onto the handle, does\r
   necessary initialization, and sets up parent/child relationship with its bus controller.\r
 \r
@@ -335,12 +335,17 @@ Returns:
   if (!EFI_ERROR (Status)) {\r
     PciIoDevice->IsPciExp = TRUE;\r
   }\r
-  \r
+\r
   //\r
   // Force Interrupt line to "Unknown" or "No Connection"\r
+  // based on the PCI spec, the Interrupt line for x86 should be set as 0xFF for unknown.\r
   //\r
   PciIo = &(PciIoDevice->PciIo);\r
+#ifndef MDE_CPU_IPF\r
   Data8 = PCI_INT_LINE_UNKNOWN;\r
+#else\r
+  Data8 = 0;\r
+#endif\r
   PciIo->Pci.Write (PciIo, EfiPciIoWidthUint8, 0x3C, 1, &Data8);\r
 \r
   //\r
@@ -436,7 +441,7 @@ RemoveAllPciDeviceOnBridge (
 Routine Description:\r
 \r
   This function is used to remove the whole PCI devices from the bridge.\r
-  \r
+\r
 Arguments:\r
 \r
   RootBridgeHandle   - An efi handle.\r
@@ -465,7 +470,7 @@ Returns:
     if (Temp->Registered) {\r
       DeRegisterPciDevice (RootBridgeHandle, Temp->Handle);\r
     }\r
-    \r
+\r
     //\r
     // Remove this node from the linked list\r
     //\r
@@ -491,7 +496,7 @@ DeRegisterPciDevice (
 Routine Description:\r
 \r
   This function is used to de-register the PCI device from the EFI,\r
-  That includes un-installing PciIo protocol from the specified PCI \r
+  That includes un-installing PciIo protocol from the specified PCI\r
   device handle.\r
 \r
 Arguments:\r
@@ -603,7 +608,7 @@ Returns:
             );\r
       return Status;\r
     }\r
-    \r
+\r
     //\r
     // The Device Driver should disable this device after disconnect\r
     // so the Pci Bus driver will not touch this device any more.\r
@@ -671,7 +676,7 @@ Returns:
 \r
       Node.DevPath = RemainingDevicePath;\r
 \r
-      if (Node.Pci->Device != Temp->DeviceNumber || \r
+      if (Node.Pci->Device != Temp->DeviceNumber ||\r
           Node.Pci->Function != Temp->FunctionNumber) {\r
         CurrentLink = CurrentLink->ForwardLink;\r
         continue;\r
@@ -683,7 +688,7 @@ Returns:
       if (!Temp->Allocated) {\r
         return EFI_NOT_READY;\r
       }\r
-      \r
+\r
       //\r
       // Check if the current node has been registered before\r
       // If it is not, register it\r
@@ -703,7 +708,7 @@ Returns:
         ChildHandleBuffer[*NumberOfChildren] = Temp->Handle;\r
         (*NumberOfChildren)++;\r
       }\r
-      \r
+\r
       //\r
       // Get the next device path\r
       //\r
@@ -711,7 +716,7 @@ Returns:
       if (EfiIsDevicePathEnd (CurrentDevicePath)) {\r
         return EFI_SUCCESS;\r
       }\r
-  \r
+\r
       //\r
       // If it is a PPB\r
       //\r
@@ -814,7 +819,7 @@ StartPciDevices (
 Routine Description:\r
 \r
   Start to manage the PCI device according to RemainingDevicePath\r
-  If RemainingDevicePath == NULL, the PCI bus driver will start \r
+  If RemainingDevicePath == NULL, the PCI bus driver will start\r
   to manage all the PCI devices it found previously\r
 \r
 Arguments:\r
@@ -1044,7 +1049,7 @@ PciDeviceExisted (
 /*++\r
 \r
 Routine Description:\r
-  \r
+\r
 Arguments:\r
 \r
   Bridge       - A pointer to the PCI_IO_DEVICE.\r
@@ -1093,7 +1098,7 @@ Routine Description:
 Arguments:\r
 \r
   VgaDevice    - A pointer to the PCI_IO_DEVICE.\r
-  \r
+\r
 Returns:\r
 \r
   None\r
@@ -1151,7 +1156,7 @@ Returns:
 \r
     Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
 \r
-    if (IS_PCI_VGA(&Temp->Pci) && \r
+    if (IS_PCI_VGA(&Temp->Pci) &&\r
         (Temp->Attributes &\r
          (EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY |\r
           EFI_PCI_IO_ATTRIBUTE_VGA_IO     |\r
@@ -1189,7 +1194,7 @@ Arguments:
   PciRootBridgeIo       - A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
   HpcDevicePath         - A pointer to the EFI_DEVICE_PATH_PROTOCL.\r
   PciAddress            - A pointer to the pci address.\r
-  \r
+\r
 Returns:\r
 \r
   None\r