\r
RESOURCE_CONFIGURATION Configuration = {\r
{{0x8A, 0x2B, 1, 0, 0, 0, 0, 0, 0, 0},\r
\r
RESOURCE_CONFIGURATION Configuration = {\r
{{0x8A, 0x2B, 1, 0, 0, 0, 0, 0, 0, 0},\r
- {0x8A, 0x2B, 0, 0, 0, 32, 0, 0, 0, 0}, \r
+ {0x8A, 0x2B, 0, 0, 0, 32, 0, 0, 0, 0},\r
{0x8A, 0x2B, 0, 0, 6, 32, 0, 0, 0, 0},\r
{0x8A, 0x2B, 0, 0, 0, 64, 0, 0, 0, 0},\r
{0x8A, 0x2B, 0, 0, 6, 64, 0, 0, 0, 0},\r
{0x8A, 0x2B, 0, 0, 6, 32, 0, 0, 0, 0},\r
{0x8A, 0x2B, 0, 0, 0, 64, 0, 0, 0, 0},\r
{0x8A, 0x2B, 0, 0, 6, 64, 0, 0, 0, 0},\r
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
IN UINT64 Address,\r
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
IN UINT64 Address,\r
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
IN UINT64 Address,\r
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
IN UINT64 Address,\r
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
IN UINT64 Attributes,\r
IN OUT UINT64 *ResourceBase,\r
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
IN UINT64 Attributes,\r
IN OUT UINT64 *ResourceBase,\r
- \r
- PrivateData->Supports = EFI_PCI_ATTRIBUTE_IDE_PRIMARY_IO | EFI_PCI_ATTRIBUTE_IDE_SECONDARY_IO | \\r
- EFI_PCI_ATTRIBUTE_ISA_IO_16 | EFI_PCI_ATTRIBUTE_ISA_MOTHERBOARD_IO | \\r
- EFI_PCI_ATTRIBUTE_VGA_MEMORY | \\r
- EFI_PCI_ATTRIBUTE_VGA_IO_16 | EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO_16;\r
+\r
+ PrivateData->Supports = EFI_PCI_ATTRIBUTE_IDE_PRIMARY_IO |\r
+ EFI_PCI_ATTRIBUTE_IDE_SECONDARY_IO |\r
+ EFI_PCI_ATTRIBUTE_ISA_IO_16 |\r
+ EFI_PCI_ATTRIBUTE_ISA_MOTHERBOARD_IO |\r
+ EFI_PCI_ATTRIBUTE_VGA_MEMORY |\r
+ EFI_PCI_ATTRIBUTE_VGA_IO_16 |\r
+ EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO_16;\r
- Status = gBS->LocateProtocol (&gEfiMetronomeArchProtocolGuid, NULL, (VOID **)&mMetronome);\r
+ Status = gBS->LocateProtocol (&gEfiMetronomeArchProtocolGuid, NULL,\r
+ (VOID **)&mMetronome);\r
- // Check to see if any address associated with this transfer exceeds the maximum \r
- // allowed address. The maximum address implied by the parameters passed in is\r
- // Address + Size * Count. If the following condition is met, then the transfer\r
- // is not supported.\r
+ // Check to see if any address associated with this transfer exceeds the\r
+ // maximum allowed address. The maximum address implied by the parameters\r
+ // passed in is Address + Size * Count. If the following condition is met,\r
+ // then the transfer is not supported.\r
- // Since Limit can be the maximum integer value supported by the CPU and Count \r
- // can also be the maximum integer value supported by the CPU, this range\r
- // check must be adjusted to avoid all oveflow conditions.\r
- // \r
- // The following form of the range check is equivalent but assumes that \r
+ // Since Limit can be the maximum integer value supported by the CPU and\r
+ // Count can also be the maximum integer value supported by the CPU, this\r
+ // range check must be adjusted to avoid all oveflow conditions.\r
+ //\r
+ // The following form of the range check is equivalent but assumes that\r
Limit = PrivateData->MemLimit;\r
} else {\r
PciRbAddr = (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS*) &Address;\r
Limit = PrivateData->MemLimit;\r
} else {\r
PciRbAddr = (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS*) &Address;\r
MaxCount = RShiftU64 (Limit, Width);\r
if (MaxCount < (Count - 1)) {\r
return EFI_UNSUPPORTED;\r
MaxCount = RShiftU64 (Limit, Width);\r
if (MaxCount < (Count - 1)) {\r
return EFI_UNSUPPORTED;\r
- Status = RootBridgeIoCheckParameter (This, MemOperation, Width, Address, Count, Buffer);\r
+ Status = RootBridgeIoCheckParameter (This, MemOperation, Width, Address,\r
+ Count, Buffer);\r
InStride = mInStride[Width];\r
OutStride = mOutStride[Width];\r
OperationWidth = (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) (Width & 0x03);\r
InStride = mInStride[Width];\r
OutStride = mOutStride[Width];\r
OperationWidth = (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) (Width & 0x03);\r
- for (Uint8Buffer = Buffer; Count > 0; Address += InStride, Uint8Buffer += OutStride, Count--) {\r
+ for (Uint8Buffer = Buffer;\r
+ Count > 0;\r
+ Address += InStride, Uint8Buffer += OutStride, Count--) {\r
- Status = RootBridgeIoCheckParameter (This, IoOperation, Width, Address, Count, Buffer);\r
+ Status = RootBridgeIoCheckParameter (This, IoOperation, Width, Address,\r
+ Count, Buffer);\r
- for (Uint8Buffer = Buffer; Count > 0; Address += InStride, Uint8Buffer += OutStride, Count--) {\r
+ for (Uint8Buffer = Buffer;\r
+ Count > 0;\r
+ Address += InStride, Uint8Buffer += OutStride, Count--) {\r
- Status = RootBridgeIoCheckParameter (This, PciOperation, Width, Address, Count, Buffer);\r
+ Status = RootBridgeIoCheckParameter (This, PciOperation, Width, Address,\r
+ Count, Buffer);\r
InStride = mInStride[Width];\r
OutStride = mOutStride[Width];\r
OperationWidth = (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) (Width & 0x03);\r
InStride = mInStride[Width];\r
OutStride = mOutStride[Width];\r
OperationWidth = (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) (Width & 0x03);\r
- for (Uint8Buffer = Buffer; Count > 0; PcieRegAddr += InStride, Uint8Buffer += OutStride, Count--) {\r
+ for (Uint8Buffer = Buffer;\r
+ Count > 0;\r
+ PcieRegAddr += InStride, Uint8Buffer += OutStride, Count--) {\r
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
IN UINT64 Address,\r
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
IN UINT64 Address,\r
Status = This->Mem.Read (This, Width, Address, 1, Result);\r
if (EFI_ERROR (Status)) {\r
return Status;\r
Status = This->Mem.Read (This, Width, Address, 1, Result);\r
if (EFI_ERROR (Status)) {\r
return Status;\r
// The "+1" to account for the possibility of the first tick being short\r
// because we started in the middle of a tick.\r
//\r
// BugBug: overriding mMetronome->TickPeriod with UINT32 until Metronome\r
// protocol definition is updated.\r
//\r
// The "+1" to account for the possibility of the first tick being short\r
// because we started in the middle of a tick.\r
//\r
// BugBug: overriding mMetronome->TickPeriod with UINT32 until Metronome\r
// protocol definition is updated.\r
//\r
while (NumberOfTicks != 0) {\r
\r
mMetronome->WaitForTick (mMetronome, 1);\r
while (NumberOfTicks != 0) {\r
\r
mMetronome->WaitForTick (mMetronome, 1);\r
Status = This->Mem.Read (This, Width, Address, 1, Result);\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
Status = This->Mem.Read (This, Width, Address, 1, Result);\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
IN UINT64 Address,\r
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
IN UINT64 Address,\r
Status = This->Io.Read (This, Width, Address, 1, Result);\r
if (EFI_ERROR (Status)) {\r
return Status;\r
Status = This->Io.Read (This, Width, Address, 1, Result);\r
if (EFI_ERROR (Status)) {\r
return Status;\r
// The "+1" to account for the possibility of the first tick being short\r
// because we started in the middle of a tick.\r
//\r
// The "+1" to account for the possibility of the first tick being short\r
// because we started in the middle of a tick.\r
//\r
while (NumberOfTicks != 0) {\r
\r
mMetronome->WaitForTick (mMetronome, 1);\r
while (NumberOfTicks != 0) {\r
\r
mMetronome->WaitForTick (mMetronome, 1);\r
Status = This->Io.Read (This, Width, Address, 1, Result);\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
Status = This->Io.Read (This, Width, Address, 1, Result);\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
- return RootBridgeIoMemRW (This, TRUE, Width, Address, Count, Buffer); \r
+ return RootBridgeIoMemRW (This, TRUE, Width, Address, Count, Buffer);\r
- return RootBridgeIoIoRW (This, FALSE, Width, Address, Count, Buffer); \r
+ return RootBridgeIoIoRW (This, FALSE, Width, Address, Count, Buffer);\r
- return RootBridgeIoIoRW (This, TRUE, Width, Address, Count, Buffer); \r
+ return RootBridgeIoIoRW (This, TRUE, Width, Address, Count, Buffer);\r
MapInfo->NumberOfPages,\r
&MapInfo->MappedHostAddress\r
);\r
MapInfo->NumberOfPages,\r
&MapInfo->MappedHostAddress\r
);\r
// then copy the contents of the real buffer into the mapped buffer\r
// so the Bus Master can read the contents of the real buffer.\r
//\r
// then copy the contents of the real buffer into the mapped buffer\r
// so the Bus Master can read the contents of the real buffer.\r
//\r
- // See if the Map() operation associated with this Unmap() required a mapping buffer.\r
- // If a mapping buffer was not required, then this function simply returns EFI_SUCCESS.\r
+ // See if the Map() operation associated with this Unmap() required a mapping\r
+ // buffer. If a mapping buffer was not required, then this function simply\r
+ // returns EFI_SUCCESS.\r
// then copy the contents of the mapped buffer into the real buffer\r
// so the processor can read the contents of the real buffer.\r
//\r
// then copy the contents of the mapped buffer into the real buffer\r
// so the processor can read the contents of the real buffer.\r
//\r
- Status = gBS->AllocatePages (AllocateMaxAddress, MemoryType, Pages, &PhysicalAddress);\r
+ Status = gBS->AllocatePages (AllocateMaxAddress, MemoryType, Pages,\r
+ &PhysicalAddress);\r
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
IN UINT64 Attributes,\r
IN OUT UINT64 *ResourceBase,\r
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
IN UINT64 Attributes,\r
IN OUT UINT64 *ResourceBase,\r
- // chipset specific knowlegde, so none of the attributes can be set or \r
- // cleared. Any attempt to set attribute that are already set will succeed, \r
+ // chipset specific knowlegde, so none of the attributes can be set or\r
+ // cleared. Any attempt to set attribute that are already set will succeed,\r
// and any attempt to set an attribute that is not supported will fail.\r
//\r
if (Attributes & (~PrivateData->Attributes)) {\r
// and any attempt to set an attribute that is not supported will fail.\r
//\r
if (Attributes & (~PrivateData->Attributes)) {\r
for (Index = 0; Index < TypeMax; Index++) {\r
if (PrivateData->ResAllocNode[Index].Status == ResAllocated) {\r
for (Index = 0; Index < TypeMax; Index++) {\r
if (PrivateData->ResAllocNode[Index].Status == ResAllocated) {\r
- Configuration.SpaceDesp[Index].AddrRangeMin = PrivateData->ResAllocNode[Index].Base;\r
- Configuration.SpaceDesp[Index].AddrRangeMax = PrivateData->ResAllocNode[Index].Base + PrivateData->ResAllocNode[Index].Length - 1;\r
- Configuration.SpaceDesp[Index].AddrLen = PrivateData->ResAllocNode[Index].Length;\r
- } \r
- } \r
- \r
- *Resources = &Configuration; \r
+ EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *Desc;\r
+\r
+ Desc = &Configuration.SpaceDesp[Index];\r
+ Desc->AddrRangeMin = PrivateData->ResAllocNode[Index].Base;\r
+ Desc->AddrRangeMax = PrivateData->ResAllocNode[Index].Base +\r
+ PrivateData->ResAllocNode[Index].Length - 1;\r
+ Desc->AddrLen = PrivateData->ResAllocNode[Index].Length;\r
+ }\r
+ }\r
+\r
+ *Resources = &Configuration;\r