3 Aug 2006 01:09
timecounters was Re:Fixes for acorn32 build after GCC4 upgrade
Mike Pumford <mpumford <at> black-star.demon.co.uk>
2006-08-02 23:09:05 GMT
2006-08-02 23:09:05 GMT
Ben Harris wrote: > That will only work so long as timer 1 isn't being used to provide a > properly randomised statclock, which it really should be made to do. It > would be better to build something based on timer 0, using the > interrupt-pending bit and the hardclock handler to emulate the high-order > bits of the timecounter. > Okay, I've now done this (apart from the interrupt pending bit part) modelled on the i8254 timer from i386. I don't think the i8254 code actually utilises the interrupt pending flag either. Not done much testing of the patch but ntpd doesn't seem too upset and the system still seems to keep reasonable time. Don't know if there are any other timecounter tests I can do. Patch is attached to this message. Next up a delay() function that doesn't rely on a ridiculously inaccurate for loop. Mike
Index: sys/arch/acorn32/include/types.h =================================================================== RCS file: /cvsroot/src/sys/arch/acorn32/include/types.h,v retrieving revision 1.3 diff -u -r1.3 types.h --- sys/arch/acorn32/include/types.h 28 Feb 2002 03:17:24 -0000 1.3(Continue reading)
RSS Feed