summaryrefslogtreecommitdiff
path: root/dev/ethertap.cc
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2005-08-23 11:45:52 -0400
committerNathan Binkert <binkertn@umich.edu>2005-08-23 11:45:52 -0400
commitc761aaae652b101959a6f5e182b67f841727de85 (patch)
tree38069755c319cfd6d1da4d8bb8ca362164ae2bc0 /dev/ethertap.cc
parent1771ee203fd749b21a51439cde853f7134688f30 (diff)
downloadgem5-c761aaae652b101959a6f5e182b67f841727de85.tar.xz
Lots of fixes to serialization and naming of various device
objects. The improper serialization of arrays was particularly bad. dev/alpha_console.cc: dev/isa_fake.cc: dev/ns_gige.cc: dev/pciconfigall.cc: dev/tsunami_cchip.cc: dev/tsunami_io.cc: dev/tsunami_pchip.cc: the pio interface is a different simobject and should have a different name. dev/ethertap.cc: fix serialization. dev/ide_ctrl.cc: - the pio interface is a different simobject and should have a different name. - properly initialize variables - When serializing an array, the size is the number of elements, not the number of bytes! dev/pcidev.cc: When serializing an array, the size is the number of elements, not the number of bytes! dev/tsunami_io.hh: Don't make objects SimObjects if they're not exposed to python. Don't add serialization functions to events, it's generally not what you want. allow the real time clock and interval timer to serialize themselves, must pass a base name since it is not a SimObject and the values will be going into the section of the parent. --HG-- extra : convert_revision : 3fc5de9b858ed770c8f385cf38b53242cf859c33
Diffstat (limited to 'dev/ethertap.cc')
-rw-r--r--dev/ethertap.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/dev/ethertap.cc b/dev/ethertap.cc
index fdd2425fc..7589991ef 100644
--- a/dev/ethertap.cc
+++ b/dev/ethertap.cc
@@ -270,7 +270,8 @@ EtherTap::serialize(ostream &os)
{
SERIALIZE_SCALAR(socket);
SERIALIZE_SCALAR(buflen);
- SERIALIZE_ARRAY((uint8_t *)buffer,buflen);
+ uint8_t *buffer = (uint8_t *)this->buffer;
+ SERIALIZE_ARRAY(buffer, buflen);
SERIALIZE_SCALAR(buffer_offset);
SERIALIZE_SCALAR(data_len);
@@ -290,7 +291,8 @@ EtherTap::unserialize(Checkpoint *cp, const std::string &section)
{
UNSERIALIZE_SCALAR(socket);
UNSERIALIZE_SCALAR(buflen);
- UNSERIALIZE_ARRAY((uint8_t *)buffer,buflen);
+ uint8_t *buffer = (uint8_t *)this->buffer;
+ UNSERIALIZE_ARRAY(buffer, buflen);
UNSERIALIZE_SCALAR(buffer_offset);
UNSERIALIZE_SCALAR(data_len);