summaryrefslogtreecommitdiffstats
path: root/bmc_epoch.hpp
Commit message (Collapse)AuthorAgeFilesLines
* clang-format: Update to match docs repoGunnar Mills2018-10-081-69/+68
| | | | | | | | | Update the .clang-format file and run clang-format-6.0. This .clang-format matches the example one in https://github.com/openbmc/docs/blob/master/cpp-style-and-conventions.md#clang-formatting Change-Id: Ic2c462525eb27b8295c2b298871e04268d93faf2 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Implement HostEpoch set time logicLei YU2017-10-161-0/+55
| | | | | | | | | | | | | | | | | | | | | | | 1. When setting host epoch, follow below logic: Mode | Owner | Set Host Time ----- | ----- | ------------- NTP | BMC | Not allowed NTP | HOST | Not allowed NTP | SPLIT | OK, and just save offset NTP | BOTH | Not allowed MANUAL| BMC | Not allowed MANUAL| HOST | OK, and set time to BMC MANUAL| SPLIT | OK, and just save offset MANUAL| BOTH | OK, and set time to BMC 2. If owner is SPLIT and BMC time is changed, update the offset accordinly; 3. Use timerfd to get notified on BMC time change, and update host time diff accordingly; 4. Add unit test cases. Change-Id: I2d60a821f7da9b689c579ae7ab672cc37967322c Signed-off-by: Lei YU <mine260309@gmail.com>
* Initial implementation of HostEpochLei YU2017-08-011-2/+2
| | | | | | | | | | | | When host time is set, the diff between the BmcTime and the value is saved to persistent storage; When host time is retrieved, return the BmcTime plus the diff as host's time. Add the unit test cases for HostEpoch. Change-Id: Ia55b93bfcba4f226ceaed8491136ea7afda7bd77 Signed-off-by: Lei YU <mine260309@gmail.com>
* Implement part of BmcEpochLei YU2017-08-011-0/+39
Add BmcEpoch which inherits EpochBase and will handle times for BMC, it is partly implemented. Add unit test cases to test basic functions. Change-Id: Ia5e4d0f884156d238f3f84df490a2efbce43e89a Signed-off-by: Lei YU <mine260309@gmail.com>
OpenPOWER on IntegriCloud