From 91cb532f9f44874e768ba749df03ca1f4dc07bc9 Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Fri, 24 Oct 2003 23:02:36 -0700 Subject: Make FullCPU schedule its TickEvent when one of its contexts becomes active. This fixes detailed-mpboot, which was broken as of my last change. Also clean up some of the ExecContext status initialization. cpu/base_cpu.hh: CPU::execCtxStatusChg() now takes thread_num as an arg so the CPU knows which execContext had the status change. BaseCPU::registerExecContexts() no longer needs to be virtual. cpu/exec_context.cc: Initialize _status directly... don't use setStatus() as this will notify the CPU of the change before it is ready. CPU::execCtxStatusChg() now takes thread_num as an arg so the CPU knows which execContext had the status change. cpu/exec_context.hh: Don't need initStatus() any more. cpu/simple_cpu/simple_cpu.cc: Move execCtxStatusChg() from header to .cc file. No longer need specialized version of registerExecContexts to schedule TickEvent. cpu/simple_cpu/simple_cpu.hh: Move execCtxStatusChg() from header to .cc file. CPU::execCtxStatusChg() now takes thread_num as arg (must be 0 for SimpleCPU). No longer need specialized version of registerExecContexts to schedule TickEvent. kern/tru64/tru64_system.cc: Don't need initRegs; the PC etc. get initialized in the CPU constructor. ExecContexts start out as Unallocated, so no need to set them to Unallocated here. kern/tru64/tru64_system.hh: Don't need initRegs; the PC etc. get initialized in the CPU constructor. sim/prog.cc: ExecContexts start out as Unallocated, so no need to set them to Unallocated here. --HG-- extra : convert_revision : e960ebbeb845960344633798e251b6c8bf1c0378 --- cpu/base_cpu.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpu/base_cpu.hh') diff --git a/cpu/base_cpu.hh b/cpu/base_cpu.hh index 5a20aaa54..143fc9662 100644 --- a/cpu/base_cpu.hh +++ b/cpu/base_cpu.hh @@ -73,7 +73,7 @@ class BaseCPU : public SimObject std::vector execContexts; public: - virtual void execCtxStatusChg() {} + virtual void execCtxStatusChg(int thread_num) {} public: @@ -94,7 +94,7 @@ class BaseCPU : public SimObject virtual void regStats(); - virtual void registerExecContexts(); + void registerExecContexts(); /// Prepare for another CPU to take over execution. Called by /// takeOverFrom() on its argument. -- cgit v1.2.3