timer_cpulocal.cc (10565:23593fdaadcd) | timer_cpulocal.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 --- 321 unchanged lines hidden (view full) --- 330 331 if (watchdogControl.watchdogMode) 332 return; 333 else if (watchdogControl.autoReload) 334 restartWatchdogCounter(watchdogLoadValue); 335} 336 337void | 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 --- 321 unchanged lines hidden (view full) --- 330 331 if (watchdogControl.watchdogMode) 332 return; 333 else if (watchdogControl.autoReload) 334 restartWatchdogCounter(watchdogLoadValue); 335} 336 337void |
338CpuLocalTimer::Timer::serialize(std::ostream &os) | 338CpuLocalTimer::Timer::serialize(CheckpointOut &cp) const |
339{ 340 DPRINTF(Checkpoint, "Serializing Arm CpuLocalTimer\n"); 341 SERIALIZE_SCALAR(intNumTimer); 342 SERIALIZE_SCALAR(intNumWatchdog); 343 344 uint32_t timer_control_serial = timerControl; 345 uint32_t watchdog_control_serial = watchdogControl; 346 SERIALIZE_SCALAR(timer_control_serial); --- 21 unchanged lines hidden (view full) --- 368 Tick watchdog_event_time; 369 if (watchdog_is_in_event){ 370 watchdog_event_time = watchdogZeroEvent.when(); 371 SERIALIZE_SCALAR(watchdog_event_time); 372 } 373} 374 375void | 339{ 340 DPRINTF(Checkpoint, "Serializing Arm CpuLocalTimer\n"); 341 SERIALIZE_SCALAR(intNumTimer); 342 SERIALIZE_SCALAR(intNumWatchdog); 343 344 uint32_t timer_control_serial = timerControl; 345 uint32_t watchdog_control_serial = watchdogControl; 346 SERIALIZE_SCALAR(timer_control_serial); --- 21 unchanged lines hidden (view full) --- 368 Tick watchdog_event_time; 369 if (watchdog_is_in_event){ 370 watchdog_event_time = watchdogZeroEvent.when(); 371 SERIALIZE_SCALAR(watchdog_event_time); 372 } 373} 374 375void |
376CpuLocalTimer::Timer::unserialize(Checkpoint *cp, const std::string §ion) | 376CpuLocalTimer::Timer::unserialize(CheckpointIn &cp) |
377{ 378 DPRINTF(Checkpoint, "Unserializing Arm CpuLocalTimer\n"); 379 380 UNSERIALIZE_SCALAR(intNumTimer); 381 UNSERIALIZE_SCALAR(intNumWatchdog); 382 383 uint32_t timer_control_serial; 384 UNSERIALIZE_SCALAR(timer_control_serial); --- 26 unchanged lines hidden (view full) --- 411 UNSERIALIZE_SCALAR(watchdog_event_time); 412 parent->schedule(watchdogZeroEvent, watchdog_event_time); 413 } 414} 415 416 417 418void | 377{ 378 DPRINTF(Checkpoint, "Unserializing Arm CpuLocalTimer\n"); 379 380 UNSERIALIZE_SCALAR(intNumTimer); 381 UNSERIALIZE_SCALAR(intNumWatchdog); 382 383 uint32_t timer_control_serial; 384 UNSERIALIZE_SCALAR(timer_control_serial); --- 26 unchanged lines hidden (view full) --- 411 UNSERIALIZE_SCALAR(watchdog_event_time); 412 parent->schedule(watchdogZeroEvent, watchdog_event_time); 413 } 414} 415 416 417 418void |
419CpuLocalTimer::serialize(std::ostream &os) | 419CpuLocalTimer::serialize(CheckpointOut &cp) const |
420{ | 420{ |
421 for (int i = 0; i < CPU_MAX; i++) { 422 nameOut(os, csprintf("%s.timer%d", name(), i)); 423 localTimer[i].serialize(os); 424 } | 421 for (int i = 0; i < CPU_MAX; i++) 422 localTimer[i].serializeSection(cp, csprintf("timer%d", i)); |
425} 426 427void | 423} 424 425void |
428CpuLocalTimer::unserialize(Checkpoint *cp, const std::string §ion) | 426CpuLocalTimer::unserialize(CheckpointIn &cp) |
429{ | 427{ |
430 for (int i = 0; i < CPU_MAX; i++) { 431 localTimer[i].unserialize(cp, csprintf("%s.timer%d", section, i)); 432 } | 428 for (int i = 0; i < CPU_MAX; i++) 429 localTimer[i].unserializeSection(cp, csprintf("timer%d", i)); |
433} 434 435CpuLocalTimer * 436CpuLocalTimerParams::create() 437{ 438 return new CpuLocalTimer(this); 439} | 430} 431 432CpuLocalTimer * 433CpuLocalTimerParams::create() 434{ 435 return new CpuLocalTimer(this); 436} |