(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
&gEfiPeiCpuIoPpiInstalledGuid,\r
NULL\r
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
&gEfiPeiCpuIoPpiInstalledGuid,\r
NULL\r
1, // EfiPeiCpuIoWidthUint8\r
2, // EfiPeiCpuIoWidthUint16\r
4, // EfiPeiCpuIoWidthUint32\r
1, // EfiPeiCpuIoWidthUint8\r
2, // EfiPeiCpuIoWidthUint16\r
4, // EfiPeiCpuIoWidthUint32\r
1, // EfiPeiCpuIoWidthUint8\r
2, // EfiPeiCpuIoWidthUint16\r
4, // EfiPeiCpuIoWidthUint32\r
1, // EfiPeiCpuIoWidthUint8\r
2, // EfiPeiCpuIoWidthUint16\r
4, // EfiPeiCpuIoWidthUint32\r
if (Address > LShiftU64 (MaxCount - Count + 1, Width)) {\r
return EFI_UNSUPPORTED;\r
}\r
if (Address > LShiftU64 (MaxCount - Count + 1, Width)) {\r
return EFI_UNSUPPORTED;\r
}\r
- InStride = mInStride[Width];\r
- OutStride = mOutStride[Width];\r
- OperationWidth = (EFI_PEI_CPU_IO_PPI_WIDTH) (Width & 0x03);\r
- Aligned = (BOOLEAN)(((UINTN)Buffer & (mInStride[OperationWidth] - 1)) == 0x00);\r
+ InStride = mInStride[Width];\r
+ OutStride = mOutStride[Width];\r
+ OperationWidth = (EFI_PEI_CPU_IO_PPI_WIDTH)(Width & 0x03);\r
+ Aligned = (BOOLEAN)(((UINTN)Buffer & (mInStride[OperationWidth] - 1)) == 0x00);\r
for (Uint8Buffer = Buffer; Count > 0; Address += InStride, Uint8Buffer += OutStride, Count--) {\r
if (OperationWidth == EfiPeiCpuIoWidthUint8) {\r
*Uint8Buffer = MmioRead8 ((UINTN)Address);\r
for (Uint8Buffer = Buffer; Count > 0; Address += InStride, Uint8Buffer += OutStride, Count--) {\r
if (OperationWidth == EfiPeiCpuIoWidthUint8) {\r
*Uint8Buffer = MmioRead8 ((UINTN)Address);\r
- InStride = mInStride[Width];\r
- OutStride = mOutStride[Width];\r
- OperationWidth = (EFI_PEI_CPU_IO_PPI_WIDTH) (Width & 0x03);\r
- Aligned = (BOOLEAN)(((UINTN)Buffer & (mInStride[OperationWidth] - 1)) == 0x00);\r
+ InStride = mInStride[Width];\r
+ OutStride = mOutStride[Width];\r
+ OperationWidth = (EFI_PEI_CPU_IO_PPI_WIDTH)(Width & 0x03);\r
+ Aligned = (BOOLEAN)(((UINTN)Buffer & (mInStride[OperationWidth] - 1)) == 0x00);\r
for (Uint8Buffer = Buffer; Count > 0; Address += InStride, Uint8Buffer += OutStride, Count--) {\r
if (OperationWidth == EfiPeiCpuIoWidthUint8) {\r
MmioWrite8 ((UINTN)Address, *Uint8Buffer);\r
for (Uint8Buffer = Buffer; Count > 0; Address += InStride, Uint8Buffer += OutStride, Count--) {\r
if (OperationWidth == EfiPeiCpuIoWidthUint8) {\r
MmioWrite8 ((UINTN)Address, *Uint8Buffer);\r
- InStride = mInStride[Width];\r
- OutStride = mOutStride[Width];\r
- OperationWidth = (EFI_PEI_CPU_IO_PPI_WIDTH) (Width & 0x03);\r
+ InStride = mInStride[Width];\r
+ OutStride = mOutStride[Width];\r
+ OperationWidth = (EFI_PEI_CPU_IO_PPI_WIDTH)(Width & 0x03);\r
- case EfiPeiCpuIoWidthUint8:\r
- IoReadFifo8 ((UINTN)Address, Count, Buffer);\r
- return EFI_SUCCESS;\r
- case EfiPeiCpuIoWidthUint16:\r
- IoReadFifo16 ((UINTN)Address, Count, Buffer);\r
- return EFI_SUCCESS;\r
- case EfiPeiCpuIoWidthUint32:\r
- IoReadFifo32 ((UINTN)Address, Count, Buffer);\r
- return EFI_SUCCESS;\r
- default:\r
- //\r
- // The CpuIoCheckParameter call above will ensure that this\r
- // path is not taken.\r
- //\r
- ASSERT (FALSE);\r
- break;\r
+ case EfiPeiCpuIoWidthUint8:\r
+ IoReadFifo8 ((UINTN)Address, Count, Buffer);\r
+ return EFI_SUCCESS;\r
+ case EfiPeiCpuIoWidthUint16:\r
+ IoReadFifo16 ((UINTN)Address, Count, Buffer);\r
+ return EFI_SUCCESS;\r
+ case EfiPeiCpuIoWidthUint32:\r
+ IoReadFifo32 ((UINTN)Address, Count, Buffer);\r
+ return EFI_SUCCESS;\r
+ default:\r
+ //\r
+ // The CpuIoCheckParameter call above will ensure that this\r
+ // path is not taken.\r
+ //\r
+ ASSERT (FALSE);\r
+ break;\r
- InStride = mInStride[Width];\r
- OutStride = mOutStride[Width];\r
- OperationWidth = (EFI_PEI_CPU_IO_PPI_WIDTH) (Width & 0x03);\r
+ InStride = mInStride[Width];\r
+ OutStride = mOutStride[Width];\r
+ OperationWidth = (EFI_PEI_CPU_IO_PPI_WIDTH)(Width & 0x03);\r
- case EfiPeiCpuIoWidthUint8:\r
- IoWriteFifo8 ((UINTN)Address, Count, Buffer);\r
- return EFI_SUCCESS;\r
- case EfiPeiCpuIoWidthUint16:\r
- IoWriteFifo16 ((UINTN)Address, Count, Buffer);\r
- return EFI_SUCCESS;\r
- case EfiPeiCpuIoWidthUint32:\r
- IoWriteFifo32 ((UINTN)Address, Count, Buffer);\r
- return EFI_SUCCESS;\r
- default:\r
- //\r
- // The CpuIoCheckParameter call above will ensure that this\r
- // path is not taken.\r
- //\r
- ASSERT (FALSE);\r
- break;\r
+ case EfiPeiCpuIoWidthUint8:\r
+ IoWriteFifo8 ((UINTN)Address, Count, Buffer);\r
+ return EFI_SUCCESS;\r
+ case EfiPeiCpuIoWidthUint16:\r
+ IoWriteFifo16 ((UINTN)Address, Count, Buffer);\r
+ return EFI_SUCCESS;\r
+ case EfiPeiCpuIoWidthUint32:\r
+ IoWriteFifo32 ((UINTN)Address, Count, Buffer);\r
+ return EFI_SUCCESS;\r
+ default:\r
+ //\r
+ // The CpuIoCheckParameter call above will ensure that this\r
+ // path is not taken.\r
+ //\r
+ ASSERT (FALSE);\r
+ break;\r
- IN CONST EFI_PEI_SERVICES **PeiServices,\r
- IN CONST EFI_PEI_CPU_IO_PPI *This,\r
- IN UINT64 Address\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_PEI_CPU_IO_PPI *This,\r
+ IN UINT64 Address\r