Hi everyone,

Some days ago I began to work on a real time clock driver for HelenOS,
the final goal is to fix ticket #397 (Implement wall-clock time
facility);
I've already discussed some little details with Jakub both on IRC and
via email but since
the arguments are becoming a bit technical a more open communication
on the ML is now required.

What I've done until now:

Basically, I was looking at how the RTC driver has been implemented in
other operating systems, namely Minix, Linux and some BSDs.

- How the RTC driver works in Minix

The "readclock" (minix/drivers/readclock/readclock.c) service is
launched at boot, it reads the CMOS memory, execute a syscall that
sets a "time_t boottime" variable inside the kernel and finally exits;
the current time is obtained by a simple sum (boottime + uptime).

- How the RTC driver works in Linux:

The RTC is implemented a character device driver
(linux/drivers/char/rtc.c), you can read /dev/rtc to make use of timer
interrupts or /proc/drivers/rtc to read the current time/date, battery
status etc etc.
--------------------------------------

Jakub said that in HelenOS there are more possibilities than just
implement the driver as a character device;
quoting his words:

<jermar> [...] as for classifying rtc as a character device
<jermar> in Linux, this is probably because devices there are either
character, or block
<jermar> in HelenOS, there are more possibilities
<jermar> not so sure rtc needs to be a char device
<jermar> it also does not mean it cannot be a char device: just wanted
to point out that there are more possibilities


I have to look at some existing drivers to figure out how.

That's all. Coding phase has not begun yet because I need to get some
confidence with the DDF before.

Cheers,
-- 
--------------------
Maurizio Lombardi

_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel

Reply via email to