History log of /openbmc/phosphor-time-manager/main.cpp (Results 1 – 14 of 14)
Revision Date Author Comments
# f90892d4 22-Jul-2024 Amithash Prasasd <amithash@meta.com>

Fix getManagedObjects on ObjectManager returning no objects

Currently, when calling getManagedObjects
```
busctl call xyz.openbmc_project.Time.Manager \
/xyz/openbmc_project/time/bmc \
org.freed

Fix getManagedObjects on ObjectManager returning no objects

Currently, when calling getManagedObjects
```
busctl call xyz.openbmc_project.Time.Manager \
/xyz/openbmc_project/time/bmc \
org.freedesktop.DBus.ObjectManager \
GetManagedObjects
```
we end up getting no objects `a{oa{sa{sv}}} 0`. This is incorrect
and we technically should return the managed objects.
Looking further at the spec:
```
All returned object paths are children of the object path implementing
this interface, i.e. their object paths start with the ObjectManager's
object path plus '/'.
```
This implies that the the path owned by the object manager should
not be the bmc sub-entries but `/xyz/openbmc_project/time`

Change-Id: I3f2ee23ecfe745eb2e4e177e044645acc2015d88
Signed-off-by: Amithash Prasasd <amithash@meta.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 ...


# 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


# 0a70452a 13-Apr-2020 George Liu <liuxiwei@inspur.com>

Remove Deferred Updates

Remove deferred consumption of settings Manual/NTP and allow instant
consumption.

Tested:
Manually set the timeMode to NTP on the WEB and successfully.
busctl get-property x

Remove Deferred Updates

Remove deferred consumption of settings Manual/NTP and allow instant
consumption.

Tested:
Manually set the timeMode to NTP on the WEB and successfully.
busctl get-property xyz.openbmc_project.Settings
/xyz/openbmc_project/time/sync_method
xyz.openbmc_project.Time.Synchronization TimeSyncMethod
s "xyz.openbmc_project.Time.Synchronization.Method.NTP"

Manually set the date time successfully by D-Bus when timeMode is MANUAL
busctl set-property xyz.openbmc_project.Time.Manager
/xyz/openbmc_project/time/bmc xyz.openbmc_project.Time.EpochTime Elapsed
t 1514765953791262

Manually set the date time failed by D-Bus when timeMode is NTP.
busctl set-property xyz.openbmc_project.Time.Manager
/xyz/openbmc_project/time/bmc xyz.openbmc_project.Time.EpochTime Elapsed
t 1514765953791262
Failed to set property Elapsed on interface
xyz.openbmc_project.TIme.EpochTime: The operation failed

~# journalctl -b | grep timemanager
Jan 01 00:15:26 fp5280g2 phosphor-timemanager[309]: Error in setting
system time
Jan 01 00:15:26 fp5280g2 phosphor-timemanager[309]: The operation
failed

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

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

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 repo and
needed

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/master/cpp-style-an

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 ...


# 7f25c53f 25-Oct-2017 Gunnar Mills <gmills@us.ibm.com>

Spelling fixes

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


# 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 | BMC | Not allowed

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 ...


# 415b964f 08-Feb-2017 Lei YU <mine260309@gmail.com>

Add time Manager to handle property changes callback

1. Implement time::Manager who registers property change signal for time
mode and owner;
2. Add PropertyChangeListner interface to handle the cal

Add time Manager to handle property changes callback

1. Implement time::Manager who registers property change signal for time
mode and owner;
2. Add PropertyChangeListner interface to handle the callback;
3. Make EpochBase to implement the interface.

Change-Id: I185580ae37353e1ed82a47e4905fb22e269ac09d
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 plus the diff as

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 ...


# 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.

Change-Id: Ia5e4d0f884156d238

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 ...


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

Intialize new phosphor-time-manager

phosphor-time-manager will be refactored to use sdbusplus interfaces.
This is a initial commit that EpochBase is implemented based on dbus
interface xyz/openbmc_p

Intialize new phosphor-time-manager

phosphor-time-manager will be refactored to use sdbusplus interfaces.
This is a initial commit that EpochBase is implemented based on dbus
interface xyz/openbmc_project/Time/EpochTime.interface.yaml.

EpochBase is the base class that wraps EpochTime interface, and is
initialized with time mode and owner from settingsd.

An initial unit test case is added.

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

show more ...