From: M. R. B. <ma...@uw...> - 2000-12-07 02:44:28
|
On Thu, 7 Dec 2000, Philipp Rumpf wrote: > On Wed, Dec 06, 2000 at 07:36:39PM -0600, M. R. Brown wrote: > > On Thu, 7 Dec 2000, Rene Malmgren wrote: > > > These funktions can be switched in att compile time or dynamicly at runtime. > > > Then we simply write an rtc_gen.c and a rtc_dc.c, or perhaps even an > > > rtc_sh3_gen.c, rtc_sh4_gen.c and an rtc_sh4_dc.c. Then we make all the other > > > functions that use ther RTC access it through these two funktions. The > > > get_timer_freq for instance. No modification has to be made to the generic > > > code at all. You just simply chose the type of timer you want. We should > > > consider doing the same thing to the timers aswell. > > > Rene, what you just described is *exactly* what Phillip is planning to do. > > He's moving generic SH4 RTC code into rtc.c so the generic SH4 target (and > > any other machine that uses the SH4's builtin RTC) can use it. Then he's > > adding get_timer_frequency, get_rtc_time, and set_rtc_time to the machine > > that's the main difference between Rene's proposal and mine: I think using > gettimeofday for the timer calibration is too expensive - it adds 1.5 seconds > to our average boot time. since many systems can use the 1/128 s - 1/64 s > code or can determine their clocks statically (eg get it from firmware). > > It's a tradeoff. 4 bytes of bloat versus 1.5 wasted seconds. (the actual code > can be allocated in initmem). > > Actually, if we start counting bytes, we might want to split up machvecs into > initmem and permanent parts - but I'm not sure it's worth the obfuscation. > Hmm, somebody please help me confirm this, but I'm almost certain (based on all of the specs I've seen) that the Dreamcast CPU runs at 200MHz. Unfortunately I don't have the other specs (bus freq, etc.) in front of me, but they're static as well (they're probably the standard SH4 ratio). I seriously doubt they would change in the future :). Personally I'd rather lose the 1.5 seconds :) M. R. |