RFC: new design of phosphor-time-manager on sdbusplus
mine260309 at gmail.com
Fri Jan 13 18:42:50 AEDT 2017
I’d like to discuss the design of phosphor-time-manager with the new
Please see below background and new design, let me know if you have any
Legacy time-manager expose below interfaces and methods:
- SetTime(target, time)
The implementation of Get/SetTime() will check the current time mode and
owner, and do below:
- For GetTime(<target>):
- If target is “bmc”, return BMC time;
- If target is “host”, return Host time;
- Else, return error
- For SetTime(target, time):
- If target is “bmc”:
- If mode is NTP, return error
- If owner is “HOST”, return error
- Set BMC time
- If target is “host”:
- If owner is “BMC”, return error
- Set Host time
- If owner is “SPLIT”, save the diff between BMC time and Host
Now with sdbusplus, we have EpochTime interface, with elapsed property.
After discussion with Li Yi and Vishwa, we decided to implement as below:
Create two objects:
They both implements EpochTime interface.
- When elapsed() is called, return BMC time;
- When elapsed(us) is called, use above SetTime(“bmc”) logic
- When elapsed() is called, return HOST time;
- When elapsed(us) is called, use above SetTime(“host”) logic.
And there will be no “curr_time_mode/owner” or “requested_time_mode/owner”
properties on DBUS.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the openbmc