mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-30 00:54:06 +02:00
Update the PCI bus driver to correctly set the EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM attribute of PCI IO. Per UEFI spec, this attribute is used to determine if the ROM image is from the ROM BAR or from a platform specific location.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11159 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
f92d103109
commit
4ed4e19c08
@ -223,6 +223,11 @@ struct _PCI_IO_DEVICE {
|
|||||||
//
|
//
|
||||||
UINT32 Decodes;
|
UINT32 Decodes;
|
||||||
|
|
||||||
|
//
|
||||||
|
// TRUE if the ROM image is from the PCI Option ROM BAR
|
||||||
|
//
|
||||||
|
BOOLEAN EmbeddedRom;
|
||||||
|
|
||||||
//
|
//
|
||||||
// The OptionRom Size
|
// The OptionRom Size
|
||||||
//
|
//
|
||||||
|
@ -268,6 +268,7 @@ RegisterPciDevice (
|
|||||||
&PlatformOpRomSize
|
&PlatformOpRomSize
|
||||||
);
|
);
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
|
PciIoDevice->EmbeddedRom = FALSE;
|
||||||
PciIoDevice->RomSize = PlatformOpRomSize;
|
PciIoDevice->RomSize = PlatformOpRomSize;
|
||||||
PciIoDevice->PciIo.RomSize = PlatformOpRomSize;
|
PciIoDevice->PciIo.RomSize = PlatformOpRomSize;
|
||||||
PciIoDevice->PciIo.RomImage = PlatformOpRomBuffer;
|
PciIoDevice->PciIo.RomImage = PlatformOpRomBuffer;
|
||||||
@ -293,6 +294,7 @@ RegisterPciDevice (
|
|||||||
&PlatformOpRomSize
|
&PlatformOpRomSize
|
||||||
);
|
);
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
|
PciIoDevice->EmbeddedRom = FALSE;
|
||||||
PciIoDevice->RomSize = PlatformOpRomSize;
|
PciIoDevice->RomSize = PlatformOpRomSize;
|
||||||
PciIoDevice->PciIo.RomSize = PlatformOpRomSize;
|
PciIoDevice->PciIo.RomSize = PlatformOpRomSize;
|
||||||
PciIoDevice->PciIo.RomImage = PlatformOpRomBuffer;
|
PciIoDevice->PciIo.RomImage = PlatformOpRomBuffer;
|
||||||
|
@ -940,6 +940,15 @@ PciSetDeviceAttribute (
|
|||||||
EFI_PCI_IO_ATTRIBUTE_BUS_MASTER );
|
EFI_PCI_IO_ATTRIBUTE_BUS_MASTER );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
//
|
||||||
|
// When this attribute is clear, the RomImage and RomSize fields in the PCI IO were
|
||||||
|
// initialized based on the PCI option ROM found through the ROM BAR of the PCI controller.
|
||||||
|
// When this attribute is set, the PCI option ROM described by the RomImage and RomSize
|
||||||
|
// fields is not from the the ROM BAR of the PCI controller.
|
||||||
|
//
|
||||||
|
if (!PciIoDevice->EmbeddedRom) {
|
||||||
|
Attributes |= EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM;
|
||||||
|
}
|
||||||
PciIoDevice->Attributes = Attributes;
|
PciIoDevice->Attributes = Attributes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -500,6 +500,7 @@ LoadOpRomImage (
|
|||||||
|
|
||||||
RomDecode (PciDevice, RomBarIndex, RomBar, FALSE);
|
RomDecode (PciDevice, RomBarIndex, RomBar, FALSE);
|
||||||
|
|
||||||
|
PciDevice->EmbeddedRom = TRUE;
|
||||||
PciDevice->PciIo.RomSize = RomImageSize;
|
PciDevice->PciIo.RomSize = RomImageSize;
|
||||||
PciDevice->PciIo.RomImage = RomInMemory;
|
PciDevice->PciIo.RomImage = RomInMemory;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user