EFI_PHYSICAL_ADDRESS PrdTableMapAddr;\r
VOID *PrdTableMap;\r
EFI_ATA_DMA_PRD *PrdBaseAddr;\r
+ EFI_ATA_DMA_PRD *TempPrdBaseAddr;\r
UINTN PrdTableNum;\r
\r
UINT8 RegisterValue;\r
//\r
// Fill the PRD table with appropriate bus master address of data buffer and data length.\r
//\r
- ByteRemaining = ByteCount;\r
+ ByteRemaining = ByteCount;\r
+ TempPrdBaseAddr = PrdBaseAddr;\r
while (ByteRemaining != 0) {\r
if (ByteRemaining <= 0x10000) {\r
- PrdBaseAddr->RegionBaseAddr = (UINT32) ((UINTN) BufferMapAddress);\r
- PrdBaseAddr->ByteCount = (UINT16) ByteRemaining;\r
- PrdBaseAddr->EndOfTable = 0x8000;\r
+ TempPrdBaseAddr->RegionBaseAddr = (UINT32) ((UINTN) BufferMapAddress);\r
+ TempPrdBaseAddr->ByteCount = (UINT16) ByteRemaining;\r
+ TempPrdBaseAddr->EndOfTable = 0x8000;\r
break;\r
}\r
\r
- PrdBaseAddr->RegionBaseAddr = (UINT32) ((UINTN) BufferMapAddress);\r
- PrdBaseAddr->ByteCount = (UINT16) 0x0;\r
+ TempPrdBaseAddr->RegionBaseAddr = (UINT32) ((UINTN) BufferMapAddress);\r
+ TempPrdBaseAddr->ByteCount = (UINT16) 0x0;\r
\r
ByteRemaining -= 0x10000;\r
BufferMapAddress += 0x10000;\r
- PrdBaseAddr++;\r
+ TempPrdBaseAddr++;\r
}\r
\r
//\r