mirror of https://github.com/acidanthera/audk.git
Set 0xff to both bridge & non-bridge device in case of unknown device.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2123 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
fa67a8b221
commit
e53a7e1bc9
|
@ -283,28 +283,29 @@ RegisterPciDevice (
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This function is used to register the PCI device to the EFI,
|
This function registers the PCI IO device. It creates a handle for this PCI IO device
|
||||||
create a handle for this PCI device,then attach apporpriate protocols
|
(if the handle does not exist), attaches appropriate protocols onto the handle, does
|
||||||
onto the handle.
|
necessary initialization, and sets up parent/child relationship with its bus controller.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Controller - An efi handle.
|
Controller - An EFI handle for the PCI bus controller.
|
||||||
PciIoDevice - A pointer to the PCI_IO_DEVICE.
|
PciIoDevice - A PCI_IO_DEVICE pointer to the PCI IO device to be registered.
|
||||||
Handle - A pointer to a efi handle.
|
Handle - A pointer to hold the EFI handle for the PCI IO device.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
None
|
EFI_SUCCESS - The PCI device is successfully registered.
|
||||||
|
Others - An error occurred when registering the PCI device.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
// TODO: EFI_SUCCESS - add return value to function comment
|
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
VOID *PlatformOpRomBuffer;
|
VOID *PlatformOpRomBuffer;
|
||||||
UINTN PlatformOpRomSize;
|
UINTN PlatformOpRomSize;
|
||||||
UINT8 PciExpressCapRegOffset;
|
UINT8 PciExpressCapRegOffset;
|
||||||
EFI_PCI_IO_PROTOCOL *PciIo;
|
EFI_PCI_IO_PROTOCOL *PciIo;
|
||||||
|
UINT8 Data8;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Install the pciio protocol, device path protocol
|
// Install the pciio protocol, device path protocol
|
||||||
|
@ -336,10 +337,11 @@ Returns:
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Force Interrupt line to zero for cards that come up randomly
|
// Force Interrupt line to "Unknown" or "No Connection"
|
||||||
//
|
//
|
||||||
PciIo = &(PciIoDevice->PciIo);
|
PciIo = &(PciIoDevice->PciIo);
|
||||||
PciIo->Pci.Write (PciIo, EfiPciIoWidthUint8, 0x3C, 1, &gAllZero);
|
Data8 = PCI_INT_LINE_UNKNOWN;
|
||||||
|
PciIo->Pci.Write (PciIo, EfiPciIoWidthUint8, 0x3C, 1, &Data8);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Process Platform OpRom
|
// Process Platform OpRom
|
||||||
|
|
Loading…
Reference in New Issue