tlb.cc (10873:7c972b9aea16) tlb.cc (10905:a6ca6831e775)
1/*
2 * Copyright (c) 2010-2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 369 unchanged lines hidden (view full) ---

378 stage2Tlb->takeOverFrom(otlb->stage2Tlb);
379 }
380 } else {
381 panic("Incompatible TLB type!");
382 }
383}
384
385void
1/*
2 * Copyright (c) 2010-2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 369 unchanged lines hidden (view full) ---

378 stage2Tlb->takeOverFrom(otlb->stage2Tlb);
379 }
380 } else {
381 panic("Incompatible TLB type!");
382 }
383}
384
385void
386TLB::serialize(ostream &os)
386TLB::serialize(CheckpointOut &cp) const
387{
388 DPRINTF(Checkpoint, "Serializing Arm TLB\n");
389
390 SERIALIZE_SCALAR(_attr);
391 SERIALIZE_SCALAR(haveLPAE);
392 SERIALIZE_SCALAR(directToStage2);
393 SERIALIZE_SCALAR(stage2Req);
394
395 int num_entries = size;
396 SERIALIZE_SCALAR(num_entries);
387{
388 DPRINTF(Checkpoint, "Serializing Arm TLB\n");
389
390 SERIALIZE_SCALAR(_attr);
391 SERIALIZE_SCALAR(haveLPAE);
392 SERIALIZE_SCALAR(directToStage2);
393 SERIALIZE_SCALAR(stage2Req);
394
395 int num_entries = size;
396 SERIALIZE_SCALAR(num_entries);
397 for(int i = 0; i < size; i++){
398 nameOut(os, csprintf("%s.TlbEntry%d", name(), i));
399 table[i].serialize(os);
400 }
397 for(int i = 0; i < size; i++)
398 table[i].serializeSection(cp, csprintf("TlbEntry%d", i));
401}
402
403void
399}
400
401void
404TLB::unserialize(Checkpoint *cp, const string &section)
402TLB::unserialize(CheckpointIn &cp)
405{
406 DPRINTF(Checkpoint, "Unserializing Arm TLB\n");
407
408 UNSERIALIZE_SCALAR(_attr);
409 UNSERIALIZE_SCALAR(haveLPAE);
410 UNSERIALIZE_SCALAR(directToStage2);
411 UNSERIALIZE_SCALAR(stage2Req);
412
413 int num_entries;
414 UNSERIALIZE_SCALAR(num_entries);
403{
404 DPRINTF(Checkpoint, "Unserializing Arm TLB\n");
405
406 UNSERIALIZE_SCALAR(_attr);
407 UNSERIALIZE_SCALAR(haveLPAE);
408 UNSERIALIZE_SCALAR(directToStage2);
409 UNSERIALIZE_SCALAR(stage2Req);
410
411 int num_entries;
412 UNSERIALIZE_SCALAR(num_entries);
415 for(int i = 0; i < min(size, num_entries); i++){
416 table[i].unserialize(cp, csprintf("%s.TlbEntry%d", section, i));
417 }
413 for(int i = 0; i < min(size, num_entries); i++)
414 table[i].unserializeSection(cp, csprintf("TlbEntry%d", i));
418}
419
420void
421TLB::regStats()
422{
423 instHits
424 .name(name() + ".inst_hits")
425 .desc("ITB inst hits")

--- 1012 unchanged lines hidden ---
415}
416
417void
418TLB::regStats()
419{
420 instHits
421 .name(name() + ".inst_hits")
422 .desc("ITB inst hits")

--- 1012 unchanged lines hidden ---