\r
--*/\r
\r
-#include "Pcibus.h"\r
+#include "pcibus.h"\r
#include "PciEnumeratorSupport.h"\r
#include "PciCommand.h"\r
#include "PciIo.h"\r
//\r
if (gFullEnumeration) {\r
\r
- PciSetCommandRegister (PciIoDevice, 0);\r
+ PciDisableCommandRegister (PciIoDevice, EFI_PCI_COMMAND_BITS_OWNED);\r
\r
}\r
\r
);\r
\r
if (gFullEnumeration) {\r
- PciSetCommandRegister (PciIoDevice, 0);\r
+ PciDisableCommandRegister (PciIoDevice, EFI_PCI_COMMAND_BITS_OWNED);\r
\r
//\r
// Initalize the bridge control register\r
//\r
- PciSetBridgeControlRegister (PciIoDevice, 0);\r
+ PciDisableBridgeControlRegister (PciIoDevice, EFI_PCI_BRIDGE_CONTROL_BITS_OWNED);\r
\r
}\r
\r
);\r
\r
if (gFullEnumeration) {\r
- PciSetCommandRegister (PciIoDevice, 0);\r
+ PciDisableCommandRegister (PciIoDevice, EFI_PCI_COMMAND_BITS_OWNED);\r
\r
//\r
// Initalize the bridge control register\r
//\r
- PciSetBridgeControlRegister (PciIoDevice, 0);\r
+ PciDisableBridgeControlRegister (PciIoDevice, EFI_PCCARD_BRIDGE_CONTROL_BITS_OWNED);\r
\r
}\r
//\r
Attributes |= EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO;\r
}\r
\r
+ if (BridgeControl & EFI_PCI_BRIDGE_CONTROL_VGA_16) {\r
+ Attributes |= EFI_PCI_IO_ATTRIBUTE_VGA_IO_16;\r
+ Attributes |= EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16;\r
+ }\r
+\r
if (Option == EFI_SET_SUPPORTS) {\r
\r
Attributes |= EFI_PCI_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE | \r
\r
}\r
\r
+STATIC\r
EFI_STATUS\r
ProcessOptionRomLight (\r
IN PCI_IO_DEVICE *PciIoDevice\r
EFI_PCI_COMMAND_BUS_MASTER |\r
EFI_PCI_COMMAND_VGA_PALETTE_SNOOP;\r
\r
- BridgeControl = EFI_PCI_BRIDGE_CONTROL_ISA | EFI_PCI_BRIDGE_CONTROL_VGA;\r
+ BridgeControl = EFI_PCI_BRIDGE_CONTROL_ISA | EFI_PCI_BRIDGE_CONTROL_VGA | EFI_PCI_BRIDGE_CONTROL_VGA_16;\r
\r
//\r
// Test whether the device can support attributes above\r
// TODO: BarIndex - add argument and description to function comment\r
{\r
UINT32 Value;\r
- UINT64 BarValue64;\r
UINT32 OriginalValue;\r
UINT32 Mask;\r
UINT32 Data;\r
\r
OriginalValue = 0;\r
Value = 0;\r
- BarValue64 = 0;\r
\r
Status = BarExisted (\r
PciIoDevice,\r
// Need to treat it as no-bar\r
//\r
if (PciIoDevice->PciBar[BarIndex].Length == 0) {\r
- PciIoDevice->PciBar[BarIndex].BarType = 0;\r
+ PciIoDevice->PciBar[BarIndex].BarType = (PCI_BAR_TYPE) 0;\r
}\r
\r
PciIoDevice->PciBar[BarIndex].Prefetchable = FALSE;\r