changeset f5d159450dfb in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=f5d159450dfb
description:
ARM: pl111/LCD framebuffer checkpointing fix
Fixed check pointing of the framebuffer. Previously, the pixel size
was not
considered in determining the size of the buffer to checkpoint. This
patch
checkpoints the entire framebuffer instead of the first quarter.
diffstat:
src/dev/arm/pl111.cc | 5 ++---
src/dev/arm/pl111.hh | 2 ++
2 files changed, 4 insertions(+), 3 deletions(-)
diffs (41 lines):
diff -r 88fa4031a9e3 -r f5d159450dfb src/dev/arm/pl111.cc
--- a/src/dev/arm/pl111.cc Mon Jan 07 13:05:38 2013 -0500
+++ b/src/dev/arm/pl111.cc Mon Jan 07 13:05:39 2013 -0500
@@ -76,7 +76,6 @@
pic = simout.create(csprintf("%s.framebuffer.bmp", sys->name()), true);
- const int buffer_size = LcdMaxWidth * LcdMaxHeight * sizeof(uint32_t);
dmaBuffer = new uint8_t[buffer_size];
memset(lcdPalette, 0, sizeof(lcdPalette));
@@ -581,7 +580,7 @@
SERIALIZE_SCALAR(width);
SERIALIZE_SCALAR(bytesPerPixel);
- SERIALIZE_ARRAY(dmaBuffer, height * width);
+ SERIALIZE_ARRAY(dmaBuffer, buffer_size);
SERIALIZE_SCALAR(startTime);
SERIALIZE_SCALAR(startAddr);
SERIALIZE_SCALAR(maxAddr);
@@ -683,7 +682,7 @@
UNSERIALIZE_SCALAR(width);
UNSERIALIZE_SCALAR(bytesPerPixel);
- UNSERIALIZE_ARRAY(dmaBuffer, height * width);
+ UNSERIALIZE_ARRAY(dmaBuffer, buffer_size);
UNSERIALIZE_SCALAR(startTime);
UNSERIALIZE_SCALAR(startAddr);
UNSERIALIZE_SCALAR(maxAddr);
diff -r 88fa4031a9e3 -r f5d159450dfb src/dev/arm/pl111.hh
--- a/src/dev/arm/pl111.hh Mon Jan 07 13:05:38 2013 -0500
+++ b/src/dev/arm/pl111.hh Mon Jan 07 13:05:39 2013 -0500
@@ -96,6 +96,8 @@
static const int dmaSize = 8; // 64 bits
static const int maxOutstandingDma = 16; // 16 deep FIFO of 64 bits
+ static const int buffer_size = LcdMaxWidth * LcdMaxHeight *
sizeof(uint32_t);
+
enum LcdMode {
bpp1 = 0,
bpp2,
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev