Lei YU | 415b964 | 2017-02-09 11:37:26 +0800 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | namespace phosphor |
| 4 | { |
| 5 | namespace time |
| 6 | { |
| 7 | /** @brief Supported time modes |
| 8 | * NTP Time sourced by Network Time Server |
| 9 | * MANUAL User of the system need to set the time |
| 10 | */ |
| 11 | enum class Mode |
| 12 | { |
| 13 | NTP, |
| 14 | MANUAL, |
| 15 | }; |
| 16 | |
| 17 | /** @brief Supported time owners |
| 18 | * BMC Time source may be NTP or MANUAL but it has to be set natively |
| 19 | * on the BMC. Meaning, host can not set the time. What it also |
| 20 | * means is that when BMC gets IPMI_SET_SEL_TIME, then its ignored. |
| 21 | * similarly, when BMC gets IPMI_GET_SEL_TIME, then the BMC's time |
| 22 | * is returned. |
| 23 | * |
| 24 | * HOST Its only IPMI_SEL_SEL_TIME that will set the time on BMC. |
| 25 | * Meaning, IPMI_GET_SEL_TIME and request to get BMC time will |
| 26 | * result in same value. |
| 27 | * |
| 28 | * SPLIT Both BMC and HOST will maintain their individual clocks but then |
| 29 | * the time information is stored in BMC. BMC can have either NTP |
| 30 | * or MANUAL as it's source of time and will set the time directly |
| 31 | * on the BMC. When IPMI_SET_SEL_TIME is received, then the delta |
| 32 | * between that and BMC's time is calculated and is stored. |
| 33 | * When BMC reads the time, the current time is returned. |
| 34 | * When IPMI_GET_SEL_TIME is received, BMC's time is retrieved and |
| 35 | * then the delta offset is factored in prior to returning. |
| 36 | * |
| 37 | * BOTH: BMC's time is set with whoever that sets the time. Similarly, |
| 38 | * BMC's time is returned to whoever that asks the time. |
| 39 | */ |
| 40 | enum class Owner |
| 41 | { |
| 42 | BMC, |
| 43 | HOST, |
| 44 | SPLIT, |
| 45 | BOTH, |
| 46 | }; |
| 47 | } |
| 48 | } |
| 49 | |