ULONG Page;
FAST486_PAGE_TABLE TableEntry;
INT Cpl = Fast486GetCurrentPrivLevel(State);
+ ULONG BufferOffset = 0;
for (Page = PAGE_ALIGN(LinearAddress);
Page <= PAGE_ALIGN(LinearAddress + Size - 1);
{
/* Start reading from the offset from the beginning of the page */
PageOffset = PAGE_OFFSET(LinearAddress);
+ PageLength -= PageOffset;
}
/* Check if this is the last page */
/* Read the memory */
State->MemReadCallback(State,
(TableEntry.Address << 12) | PageOffset,
- Buffer,
+ (PVOID)((ULONG_PTR)Buffer + BufferOffset),
PageLength);
+
+ BufferOffset += PageLength;
}
}
else
ULONG Page;
FAST486_PAGE_TABLE TableEntry;
INT Cpl = Fast486GetCurrentPrivLevel(State);
+ ULONG BufferOffset = 0;
for (Page = PAGE_ALIGN(LinearAddress);
Page <= PAGE_ALIGN(LinearAddress + Size - 1);
{
/* Start writing from the offset from the beginning of the page */
PageOffset = PAGE_OFFSET(LinearAddress);
+ PageLength -= PageOffset;
}
/* Check if this is the last page */
/* Write the memory */
State->MemWriteCallback(State,
(TableEntry.Address << 12) | PageOffset,
- Buffer,
+ (PVOID)((ULONG_PTR)Buffer + BufferOffset),
PageLength);
+
+ BufferOffset += PageLength;
}
}
else