-/*++\r
-\r
-Copyright (c) 2006 - 2007, 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
-Abstract:\r
+/**@file\r
\r
- This file provides routine to support Pci device node manipulation\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
-Revision History\r
+**/\r
\r
---*/\r
\r
#include "pcibus.h"\r
#include "PciDeviceSupport.h"\r
PciIoDevice->PciIo.RomSize = PlatformOpRomSize;\r
PciIoDevice->PciIo.RomImage = PlatformOpRomBuffer;\r
\r
+ //\r
+ // For OpROM read from gPciPlatformProtocol:\r
+ // Add the Rom Image to internal database for later PCI light enumeration\r
+ //\r
+ PciRomAddImageMapping (\r
+ NULL,\r
+ PciIoDevice->PciRootBridgeIo->SegmentNumber,\r
+ PciIoDevice->BusNumber,\r
+ PciIoDevice->DeviceNumber,\r
+ PciIoDevice->FunctionNumber,\r
+ (UINT64) (UINTN) PciIoDevice->PciIo.RomImage,\r
+ PciIoDevice->PciIo.RomSize\r
+ );\r
+\r
//\r
// Process Image\r
//\r