Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,7 @@ PciTestSupportedAttribute (
)
{
EFI_TPL OldTpl;
UINT16 CommandValue;

//
// Preserve the original value
Expand All @@ -943,10 +944,12 @@ PciTestSupportedAttribute (
// Raise TPL to high level to disable timer interrupt while the BAR is probed
//
OldTpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
CommandValue = *Command | *OldCommand;

PCI_SET_COMMAND_REGISTER (PciIoDevice, *Command);
PCI_READ_COMMAND_REGISTER (PciIoDevice, Command);
PCI_SET_COMMAND_REGISTER (PciIoDevice, CommandValue);
PCI_READ_COMMAND_REGISTER (PciIoDevice, &CommandValue);

*Command = *Command & CommandValue;
//
// Write back the original value
//
Expand Down