genode/repos/os/src/drivers/rtc
Josef Söntgen 47e6d72bf2 rtc_drv: add support for setting RTC
The rtc_drv on x86 can now by used to also set the RTC. If the config
attribute 'allow_setting_rtc' is set to 'yes' the driver will update
the RTC from the content of the 'set-rtc' ROM module. A valid ROM must
contain a top node with the following attributes: 'year', 'month',
'day', 'hour', 'minute' and 'second'.

* Only rudimentary checking of the provided values is done.
* '12H' mode is not supported.

Fixes #3438.
2019-08-13 12:02:03 +02:00
..
spec rtc_drv: add support for setting RTC 2019-08-13 12:02:03 +02:00
main.cc rtc_drv: add support for setting RTC 2019-08-13 12:02:03 +02:00
README rtc_drv: add support for setting RTC 2019-08-13 12:02:03 +02:00
rtc.h rtc_drv: add support for setting RTC 2019-08-13 12:02:03 +02:00
target.inc os: name rtc_drv unambigously (ref #2190) 2019-05-16 13:11:01 +02:00

The RTC driver component provides access to the CMOS RTC on x86 via
the Rtc session. On base-linux 'gettimeofday' is used.

The component will use the content of the 'set_rtc' ROM if the
'allow_setting_rtc' attribute in the 'config' node is set to 'yes'
to allow setting the RTC. A valid ROM must contain a top node with
the following attributes:

* 'year' (e.g. 2019)
* 'month'  (1 - 12)
* 'day'    (1 - 31)
* 'hour'   (0 - 23)
* 'minute' (0 - 59)
* 'second' (0 - 59)

The component will always use 24H mode and relies on the BIOS/firmware
to do the right thing regarding the year.