RTC support.
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 23 Aug 2008 03:52:54 +0000 (03:52 +0000)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 23 Aug 2008 03:52:54 +0000 (03:52 +0000)
commitfdc9df9f83b8d6676b2fef983bf72a778e04c26f
treea60ef773e6c419f352b9c0dcf21f7a58c3b6d31d
parentbfe761705d4c6e1bb9e600ab774398b225a55f3f
RTC support.

Adapted from Anthony Romano's patch with the following changes:

        * Style adjusted to fit rest of Pintos.

        * Don't modify the RTC registers.  It shouldn't be necessary.
          We shouldn't need any initialization in fact.

        * Drop rtc_set_time stub.

        * Do handle time advancing while reading the RTC registers in
          rtc_get_time, using the strategy from Linux.

        * Fix leap year handling: adding (year / 4) * 24 * 60 * 60 is
          wrong for first 2 months of a leap year; the test (year & 4)
          should be (year % 4).

        * Simplify month code.

        * Drop enable_rtc_int, disable_rtc_int, rtc_updating that are
          not needed.

        * Update documentation.
doc/bibliography.texi
doc/threads.texi
specs/mc146818a.pdf [new file with mode: 0644]
src/Makefile.build
src/devices/rtc.c [new file with mode: 0644]
src/devices/rtc.h [new file with mode: 0644]
src/threads/init.c
src/utils/pintos