tlb.cc (5100:7a0180040755) | tlb.cc (5276:2f55b8e7f346) |
---|---|
1/* 2 * Copyright (c) 2001-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 1349 unchanged lines hidden (view full) --- 1358 i = freeList.begin(); 1359 while (i != freeList.end()) { 1360 free_list[cntr++] = ((size_t)*i - (size_t)tlb)/ sizeof(TlbEntry); 1361 i++; 1362 } 1363 SERIALIZE_SCALAR(cntr); 1364 SERIALIZE_ARRAY(free_list, cntr); 1365 | 1/* 2 * Copyright (c) 2001-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 1349 unchanged lines hidden (view full) --- 1358 i = freeList.begin(); 1359 while (i != freeList.end()) { 1360 free_list[cntr++] = ((size_t)*i - (size_t)tlb)/ sizeof(TlbEntry); 1361 i++; 1362 } 1363 SERIALIZE_SCALAR(cntr); 1364 SERIALIZE_ARRAY(free_list, cntr); 1365 |
1366 for (int x = 0; x < size; x++) { 1367 nameOut(os, csprintf("%s.PTE%d", name(), x)); 1368 tlb[x].serialize(os); 1369 } 1370 | |
1371 SERIALIZE_SCALAR(c0_tsb_ps0); 1372 SERIALIZE_SCALAR(c0_tsb_ps1); 1373 SERIALIZE_SCALAR(c0_config); 1374 SERIALIZE_SCALAR(cx_tsb_ps0); 1375 SERIALIZE_SCALAR(cx_tsb_ps1); 1376 SERIALIZE_SCALAR(cx_config); 1377 SERIALIZE_SCALAR(sfsr); 1378 SERIALIZE_SCALAR(tag_access); | 1366 SERIALIZE_SCALAR(c0_tsb_ps0); 1367 SERIALIZE_SCALAR(c0_tsb_ps1); 1368 SERIALIZE_SCALAR(c0_config); 1369 SERIALIZE_SCALAR(cx_tsb_ps0); 1370 SERIALIZE_SCALAR(cx_tsb_ps1); 1371 SERIALIZE_SCALAR(cx_config); 1372 SERIALIZE_SCALAR(sfsr); 1373 SERIALIZE_SCALAR(tag_access); |
1374 1375 for (int x = 0; x < size; x++) { 1376 nameOut(os, csprintf("%s.PTE%d", name(), x)); 1377 tlb[x].serialize(os); 1378 } |
|
1379} 1380 1381void 1382TLB::unserialize(Checkpoint *cp, const std::string §ion) 1383{ 1384 int oldSize; 1385 1386 paramIn(cp, section, "size", oldSize); --- 6 unchanged lines hidden (view full) --- 1393 UNSERIALIZE_SCALAR(cntr); 1394 1395 int *free_list = (int*)malloc(sizeof(int) * cntr); 1396 freeList.clear(); 1397 UNSERIALIZE_ARRAY(free_list, cntr); 1398 for (int x = 0; x < cntr; x++) 1399 freeList.push_back(&tlb[free_list[x]]); 1400 | 1379} 1380 1381void 1382TLB::unserialize(Checkpoint *cp, const std::string §ion) 1383{ 1384 int oldSize; 1385 1386 paramIn(cp, section, "size", oldSize); --- 6 unchanged lines hidden (view full) --- 1393 UNSERIALIZE_SCALAR(cntr); 1394 1395 int *free_list = (int*)malloc(sizeof(int) * cntr); 1396 freeList.clear(); 1397 UNSERIALIZE_ARRAY(free_list, cntr); 1398 for (int x = 0; x < cntr; x++) 1399 freeList.push_back(&tlb[free_list[x]]); 1400 |
1401 lookupTable.clear(); 1402 for (int x = 0; x < size; x++) { 1403 tlb[x].unserialize(cp, csprintf("%s.PTE%d", section, x)); 1404 if (tlb[x].valid) 1405 lookupTable.insert(tlb[x].range, &tlb[x]); 1406 1407 } 1408 | |
1409 UNSERIALIZE_SCALAR(c0_tsb_ps0); 1410 UNSERIALIZE_SCALAR(c0_tsb_ps1); 1411 UNSERIALIZE_SCALAR(c0_config); 1412 UNSERIALIZE_SCALAR(cx_tsb_ps0); 1413 UNSERIALIZE_SCALAR(cx_tsb_ps1); 1414 UNSERIALIZE_SCALAR(cx_config); 1415 UNSERIALIZE_SCALAR(sfsr); 1416 UNSERIALIZE_SCALAR(tag_access); | 1401 UNSERIALIZE_SCALAR(c0_tsb_ps0); 1402 UNSERIALIZE_SCALAR(c0_tsb_ps1); 1403 UNSERIALIZE_SCALAR(c0_config); 1404 UNSERIALIZE_SCALAR(cx_tsb_ps0); 1405 UNSERIALIZE_SCALAR(cx_tsb_ps1); 1406 UNSERIALIZE_SCALAR(cx_config); 1407 UNSERIALIZE_SCALAR(sfsr); 1408 UNSERIALIZE_SCALAR(tag_access); |
1409 1410 lookupTable.clear(); 1411 for (int x = 0; x < size; x++) { 1412 tlb[x].unserialize(cp, csprintf("%s.PTE%d", section, x)); 1413 if (tlb[x].valid) 1414 lookupTable.insert(tlb[x].range, &tlb[x]); 1415 1416 } |
|
1417} 1418 1419void 1420DTB::serialize(std::ostream &os) 1421{ 1422 TLB::serialize(os); 1423 SERIALIZE_SCALAR(sfar); 1424} --- 21 unchanged lines hidden --- | 1417} 1418 1419void 1420DTB::serialize(std::ostream &os) 1421{ 1422 TLB::serialize(os); 1423 SERIALIZE_SCALAR(sfar); 1424} --- 21 unchanged lines hidden --- |