History log of /openbmc/phosphor-time-manager/bmc_epoch.cpp (Results 1 – 22 of 22)
Revision Date Author Comments
# 714a20b5 24-Jul-2023 Andrew Geissler <geissonator@yahoo.com>

time: changes to support 64bit time

Upstream changed the default of the time_t definition to go from 32bit
to 64bit. Utilize the std::chrono::duration class to abstract the max.

Tested:
- Confirmed

time: changes to support 64bit time

Upstream changed the default of the time_t definition to go from 32bit
to 64bit. Utilize the std::chrono::duration class to abstract the max.

Tested:
- Confirmed it compiles with latest yocto

Change-Id: I78e2b3475810cf0f4d218d7bf7e72be9641a47bf
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>

show more ...


# 8af2a1e3 27-Apr-2023 Pavithra Barithaya <pavithra.b@ibm.com>

Enable cppcoreguidelines check on the repo

This commit adds cppcoreguidelines clang-tidy
checks and make necessary changes.

Change-Id: I402b82f96b7ff82e3ba6d84c9cc50435c1ead6d4
Signed-off-by: Pavit

Enable cppcoreguidelines check on the repo

This commit adds cppcoreguidelines clang-tidy
checks and make necessary changes.

Change-Id: I402b82f96b7ff82e3ba6d84c9cc50435c1ead6d4
Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>

show more ...


# 864e173e 11-Apr-2023 Pavithra Barithaya <pavithra.b@ibm.com>

Add clang-tidy file

This commit implements a clang-tidy file, and makes
some changes to get it to pass.
Most changes are naming or mechanical in nature.

Tested:
CI passed in docker.

Change-Id: I1f

Add clang-tidy file

This commit implements a clang-tidy file, and makes
some changes to get it to pass.
Most changes are naming or mechanical in nature.

Tested:
CI passed in docker.

Change-Id: I1f9acf546542c839b8f9facb5b8beff37c0d5909
Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>

show more ...


# dd42c7fa 11-Aug-2022 Pavithra Barithaya <pavithra.b@ibm.com>

Minor changes in the code

- fix a typo in README and wrap file.
- refactoring lg2 errorlog usage.

Change-Id: I3b55b86a505405f02fe70429a266c467b87b17ff
Signed-off-by: Pavithra Barithaya <pavithra.b@

Minor changes in the code

- fix a typo in README and wrap file.
- refactoring lg2 errorlog usage.

Change-Id: I3b55b86a505405f02fe70429a266c467b87b17ff
Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>

show more ...


# f1d54aec 01-Sep-2022 George Liu <liuxiwei@inspur.com>

Remove the inheritance between epoch base and bmc epoch

The epoch_base exists because it was managing bmc_time and host_time
before, and now the host_time has been removed, so the dependency on
epoc

Remove the inheritance between epoch base and bmc epoch

The epoch_base exists because it was managing bmc_time and host_time
before, and now the host_time has been removed, so the dependency on
epoch_base and bmc_epoch should be removed.

Tested: Built phosphor-time-manager successfully and CI passed.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Iff87f18d450095f8a673b2d73c50092c65adca20

show more ...


# cb421097 16-Aug-2022 George Liu <liuxiwei@inspur.com>

Move timeMode property to manager

The current logic is to maintain the same attribute in manager and
epoch_base, the purpose of this commit is to merge this attribute
into manager for maintenance.

Move timeMode property to manager

The current logic is to maintain the same attribute in manager and
epoch_base, the purpose of this commit is to merge this attribute
into manager for maintenance.

Also, Update the test/TestBmcEpoch.cpp file.

Tested: Built phosphor-time-manager successfully and UT passed.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I05fea271d672bf12ecb722005023dfa6a2a980d1

show more ...


# 38679266 22-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I9cedddf4dc9b224ecbc2f68e6b00c0ab1885a826

show more ...


# 261525d1 01-Jul-2022 George Liu <liuxiwei@inspur.com>

Fix cppcheck warnings

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ie007785a9afd036e964ba3457fdeb2e6097c9223


# 947b5346 01-Jul-2022 George Liu <liuxiwei@inspur.com>

logging: switch to lg2

It is recommended to use `phosphor::lg2` to format log, and the
correct `CODE_LINE` and `CODE_FUNC` values can be used in log
tracking.

Signed-off-by: George Liu <liuxiwei@in

logging: switch to lg2

It is recommended to use `phosphor::lg2` to format log, and the
correct `CODE_LINE` and `CODE_FUNC` values can be used in log
tracking.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ic8a400451f96cde5bdb9f47094806bd31adce7d9

show more ...


# 1e1dc447 02-Feb-2021 Ratan Gupta <ratagupt@in.ibm.com>

Fixing the unused variable compiler issue

- This commit would fix the error that are spotted by meson
when werror=true is enforced.

Tested By:

- Compiled , and un

Fixing the unused variable compiler issue

- This commit would fix the error that are spotted by meson
when werror=true is enforced.

Tested By:

- Compiled , and unit tests are passed.

Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
Change-Id: I330abdba69af36f8e02a1c22b76644beadb1c336

show more ...


# 3c2f4496 11-Apr-2020 George Liu <liuxiwei@inspur.com>

Remove TimeOwner Feature

The TimeOwner feature is confusing from feedback from the community and
hence removing the feature.
Remove the TimeOwner feature in the phosphor-time-manager

Remove TimeOwner Feature

The TimeOwner feature is confusing from feedback from the community and
hence removing the feature.
Remove the TimeOwner feature in the phosphor-time-manager repo and
needed settings objects.

Tested: Manually set the date time on the web and successfully update
the date time of BMC (eg: 2020/01/01 08:07:50).
busctrl get-property xyz.openbmc_project.Time.Manager
/xyz/openbmc_project/time/bmc
xyz.openbmc_project.Time.EpochTime Elapsed
t 1577837156385836

Refer: https://lists.ozlabs.org/pipermail/openbmc/2020-April/021409.html

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Id47eb0a03e0e94eeff29d2b77dccefb89cded7b8

show more ...


# ab4cc6a5 14-Sep-2018 Gunnar Mills <gmills@us.ibm.com>

clang-format: Update to match docs repo

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/mas

clang-format: Update to match docs repo

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>

show more ...


# f6fad820 13-Jul-2018 Lei YU <mine260309@gmail.com>

Use proper errors when failing to set time

Previously it reports InsufficientPermission when it is not allowed to
set time.

Now phosphor-dbus-interfaces defines proper errors fo

Use proper errors when failing to set time

Previously it reports InsufficientPermission when it is not allowed to
set time.

Now phosphor-dbus-interfaces defines proper errors for such case, so
report NotAllowed error when it is not allowed to set time, and report
Failed error when it failed to set time.

Tested: Get NotAllowed and Failed error with expected metadata from
journal log.

Change-Id: I53610bf27ffc3f62608cea6fd0e66ca859d94675
Signed-off-by: Lei YU <mine260309@gmail.com>

show more ...


# 33752c75 07-Jun-2018 Lei YU <mine260309@gmail.com>

Throw excpetion when it is not allowed to set time

When it is not allowed to set time depending on the time setting,
previously we only log an error and continue.
Now sdbusplus suppo

Throw excpetion when it is not allowed to set time

When it is not allowed to set time depending on the time setting,
previously we only log an error and continue.
Now sdbusplus supports errors on properties, so we can throw exception
on such case.

Tested: Verify in unittest that exception is thrown when it is not
allowed to set time.
Verify in BMC that busctl gets the error message when it is not
allowed to set time.
Change-Id: I4a04d1aa8c081abf0f9fd449118dc1107e12f689
Signed-off-by: Lei YU <mine260309@gmail.com>

show more ...


# 75710b6a 08-Apr-2018 Gunnar Mills <gmills@us.ibm.com>

Spelling fixes

Spelling errors found using github.com/lucasdemarchi/codespell
A tool to fix common misspellings.
This tool is licensed under GNU General Public License, version 2.

Spelling fixes

Spelling errors found using github.com/lucasdemarchi/codespell
A tool to fix common misspellings.
This tool is licensed under GNU General Public License, version 2.

Change-Id: I049799e380299bd4290e8f31f2f2c0186c460351
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# fa024880 08-Nov-2017 Lei YU <mine260309@gmail.com>

Fix incorrect host time after setting BMC time in NTP/Split

The time tests find an issue that after NTP/BMC is changed to
NTP/Split, setting BMC time will cause host time change.

Fix incorrect host time after setting BMC time in NTP/Split

The time tests find an issue that after NTP/BMC is changed to
NTP/Split, setting BMC time will cause host time change.

The root cause is that it fails to set BMC time (which is expected)
but still invokes notifyBmcTimeChange(), which cause host to
re-calculate the offset.

The fix is to not invoke notifyBmcTimeChange() on failure to set BMC
time.

Change-Id: Id13b5fa8ba7def764eab8afad23661f9b0be37ce
Signed-off-by: Lei YU <mine260309@gmail.com>

show more ...


# 1c2ce82c 01-Aug-2017 Lei YU <mine260309@gmail.com>

Let timedate1 to decide on setting time in NTP mode

In NTP mode, let timedate1 to set BMC time, for now, it results in
error.

Change-Id: I2d78cdcfe6868642f43198dd932b20b13fd8523

Let timedate1 to decide on setting time in NTP mode

In NTP mode, let timedate1 to set BMC time, for now, it results in
error.

Change-Id: I2d78cdcfe6868642f43198dd932b20b13fd8523d
Signed-off-by: Lei YU <mine260309@gmail.com>

show more ...


# ad14354f 25-Jul-2017 Lei YU <mine260309@gmail.com>

Use time mode owner enums in dbus interface

Dbus interface defines time mode owners in xyz::openbmc_project::Time.
Use the enums from the interface instead of repo defined enums and use

Use time mode owner enums in dbus interface

Dbus interface defines time mode owners in xyz::openbmc_project::Time.
Use the enums from the interface instead of repo defined enums and use
the generated code to do convertions between strings and enums.

Update unit tests accordingly.

Change-Id: Ic304aa3b4137375d208bb1702e0f64df512fc5a0
Signed-off-by: Lei YU <mine260309@gmail.com>

show more ...


# 7b218796 08-Feb-2017 Lei YU <mine260309@gmail.com>

Implement HostEpoch set time logic

1. When setting host epoch, follow below logic:

Mode | Owner | Set Host Time
----- | ----- | -------------
NTP

Implement HostEpoch set time logic

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>

show more ...


# af5abc57 07-Mar-2017 Lei YU <mine260309@gmail.com>

Initial implementation of HostEpoch

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

Initial implementation of HostEpoch

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>

show more ...


# e7abcdc7 16-Jan-2017 Lei YU <mine260309@gmail.com>

Implement BmcEpoch set/get elapsed()

Getting elapsed returns BMC's time;
Setting elapsed will check the current time mode/owner, and will return
error when mode is NTP or owner is HO

Implement BmcEpoch set/get elapsed()

Getting elapsed returns BMC's time;
Setting elapsed will check the current time mode/owner, and will return
error when mode is NTP or owner is HOST.

Add unit test cases.

Change-Id: Ibf4e90957f3b26b68c4a1b6dc66dc364c66bef10
Signed-off-by: Lei YU <mine260309@gmail.com>

show more ...


# 96232827 20-Jan-2017 Lei YU <mine260309@gmail.com>

Implement part of BmcEpoch

Add BmcEpoch which inherits EpochBase and will handle times for BMC,
it is partly implemented.

Add unit test cases to test basic functions.

C

Implement part of BmcEpoch

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>

show more ...