summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAli Saidi <Ali.Saidi@ARM.com>2011-02-23 15:10:48 -0600
committerAli Saidi <Ali.Saidi@ARM.com>2011-02-23 15:10:48 -0600
commit511c637ab0549952b6e67eeae65fafa8aab8c7c3 (patch)
tree5e8556da9c64938f8d212d3d32afa3e38e91c3b3 /src
parent79dac89552e7ef0fa4376ba028b10ad7d2f1ca69 (diff)
downloadgem5-511c637ab0549952b6e67eeae65fafa8aab8c7c3.tar.xz
CLCD: Fix some serialization bugs with the clcd controller.
Diffstat (limited to 'src')
-rw-r--r--src/dev/arm/pl111.cc46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/dev/arm/pl111.cc b/src/dev/arm/pl111.cc
index e884d9b58..98d231f3b 100644
--- a/src/dev/arm/pl111.cc
+++ b/src/dev/arm/pl111.cc
@@ -586,6 +586,29 @@ Pl111::serialize(std::ostream &os)
SERIALIZE_SCALAR(curAddr);
SERIALIZE_SCALAR(waterMark);
SERIALIZE_SCALAR(dmaPendingNum);
+
+ Tick int_event_time = 0;
+ Tick read_event_time = 0;
+ Tick fill_fifo_event_time = 0;
+
+ if (readEvent.scheduled())
+ read_event_time = readEvent.when();
+ if (fillFifoEvent.scheduled())
+ fill_fifo_event_time = fillFifoEvent.when();
+ if (intEvent.scheduled())
+ int_event_time = intEvent.when();
+
+ SERIALIZE_SCALAR(read_event_time);
+ SERIALIZE_SCALAR(fill_fifo_event_time);
+ SERIALIZE_SCALAR(int_event_time);
+
+ vector<Tick> dma_done_event_tick;
+ dma_done_event_tick.resize(maxOutstandingDma);
+ for (int x = 0; x < maxOutstandingDma; x++) {
+ dma_done_event_tick[x] = dmaDoneEvent[x].scheduled() ?
+ dmaDoneEvent[x].when() : 0;
+ }
+ arrayParamOut(os, "dma_done_event_tick", dma_done_event_tick);
}
void
@@ -667,6 +690,29 @@ Pl111::unserialize(Checkpoint *cp, const std::string &section)
UNSERIALIZE_SCALAR(waterMark);
UNSERIALIZE_SCALAR(dmaPendingNum);
+ Tick int_event_time = 0;
+ Tick read_event_time = 0;
+ Tick fill_fifo_event_time = 0;
+
+ UNSERIALIZE_SCALAR(read_event_time);
+ UNSERIALIZE_SCALAR(fill_fifo_event_time);
+ UNSERIALIZE_SCALAR(int_event_time);
+
+ if (int_event_time)
+ schedule(intEvent, int_event_time);
+ if (read_event_time)
+ schedule(readEvent, read_event_time);
+ if (fill_fifo_event_time)
+ schedule(fillFifoEvent, fill_fifo_event_time);
+
+ vector<Tick> dma_done_event_tick;
+ dma_done_event_tick.resize(maxOutstandingDma);
+ arrayParamIn(cp, section, "dma_done_event_tick", dma_done_event_tick);
+ for (int x = 0; x < maxOutstandingDma; x++) {
+ if (dma_done_event_tick[x])
+ schedule(dmaDoneEvent[x], dma_done_event_tick[x]);
+ }
+
updateVideoParams();
if (vncserver)
vncserver->setDirty();