There's construction, then SimObject::init(), then SimObject::regStats(), then SimObject::startup()
The first three are caused by the instantiate() call in Python, the last is caused by the first call to simulate() from Python. See src/python/m5/simulate.py Nate On Fri, May 30, 2008 at 10:49 PM, Gabe Black <[EMAIL PROTECTED]> wrote: > One other reason I just thought of is the same as the problem O3 had with > pointers and things not being completely constructed yet. I want to put the > code that sets up the timer in the platform since that's more in line with > the timer being configured a certain way to start, aka it's a standard of > the platform, not the device. I remember there being several phases of > initialization m5 goes through with different functions you can override, > and I think using one of those is probably what I want to do. Could someone > (probably Nate) run through that quickly? > > Gabe > > Gabe Black wrote: >> >> Two reasons. First, the BIOS is supposed to do that so if possible I'd >> like to keep it out of the device itself. That's not a big deal since it >> wouldn't be too hard to move if there ends up being an actual BIOS at some >> point. Second, I was concerned that initializing it in the constructor and >> then redoing it restoring from the checkpoint might cause problems, but in >> retrospect in this case I think it'll probably actually work out. I'll let >> you know if I discover otherwise, but for now that's what I'll do. >> >> Gabe >> >> nathan binkert wrote: >>> >>> I concur with Ali. >>> >>> On Fri, May 30, 2008 at 5:39 PM, Ali Saidi <[EMAIL PROTECTED]> wrote: >>> >>>> >>>> Why can't you just stick it in the constructor? You'll need to serialize >>>> that timer value when a checkpoint is dropped and create an event when >>>> the >>>> checkpoint is restored from, but you would need to do that anyway. You >>>> can >>>> take a look at how we serialize the PIT for an idea. >>>> >>>> Ali >>>> >>>> On May 30, 2008, at 6:12 PM, Gabe Black wrote: >>>> >>>> >>>>> >>>>> The kernel is assuming that timer 0 has been set up to count with a >>>>> period of 0 (which is effectively 0xFFFF, it's maximum value) by the >>>>> BIOS >>>>> during system bring up. It's trying to watch the value of the timers >>>>> count >>>>> in order to switch from using the PIT for interrupts to the APIC right >>>>> after >>>>> the timer goes off/wraps around. This is all fine, except the BIOS >>>>> never >>>>> runs so the timer never gets set up, the count never changes, and the >>>>> kernel >>>>> hangs. What I need to do is to go in and fake the initialization as if >>>>> the >>>>> BIOS had done something, but I need to make sure it works with >>>>> checkpointing >>>>> and all that so I can't just stick it in a constructor. What do people >>>>> think >>>>> is a good place to do that? I'm thinking of making it the platform >>>>> objects >>>>> responsibility but the system object is the one that knows when things >>>>> are >>>>> coming up, right? I'm only really aware of ways to bring up the CPUs >>>>> and not >>>>> how to do ISA specific initialization of the system/platform/whatever >>>>> else. >>>>> >>>>> Gabe >>>>> _______________________________________________ >>>>> m5-dev mailing list >>>>> [email protected] >>>>> http://m5sim.org/mailman/listinfo/m5-dev >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> m5-dev mailing list >>>> [email protected] >>>> http://m5sim.org/mailman/listinfo/m5-dev >>>> >>>> >>>> >>> >>> _______________________________________________ >>> m5-dev mailing list >>> [email protected] >>> http://m5sim.org/mailman/listinfo/m5-dev >>> >> >> _______________________________________________ >> m5-dev mailing list >> [email protected] >> http://m5sim.org/mailman/listinfo/m5-dev > > _______________________________________________ > m5-dev mailing list > [email protected] > http://m5sim.org/mailman/listinfo/m5-dev > > _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
