RFC: new design of phosphor-time-manager on sdbusplus
Mine
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
sdbusplus interfaces.
Please see below background and new design, let me know if you have any
comments.
Thanks!
Background
Legacy time-manager expose below interfaces and methods:
- curr_time_mode
- curr_time_owner
- requested_time_mode
- requested_time_owner
- GetTime(target)
- 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
time;
New Design
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:
- BmcEpoch
- HostEpoch
They both implements EpochTime interface.
For BmcEpoch:
- When elapsed() is called, return BMC time;
- When elapsed(us) is called, use above SetTime(“bmc”) logic
For HostEpoch:
- 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.
--
BRs,
Lei YU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20170113/76599754/attachment.html>
More information about the openbmc
mailing list