b9dd7f86 | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I014bacc34b5a3a7a2a6de6a29b81a3b147eb6ed9 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
bfda2c43 | 26-Oct-2022 |
Bonnie Lo <Bonnie_Lo@wiwynn.com> |
Extend blacklist function for address.
Currently, blacklist only support for blocking a entire bus from scanning by FruDevice. This extension makes user can specify certain addresses on i2c bus.
Ex
Extend blacklist function for address.
Currently, blacklist only support for blocking a entire bus from scanning by FruDevice. This extension makes user can specify certain addresses on i2c bus.
Example : { "buses": [ 10, 12, { "bus": 11, "addresses": ["0x40", "0x44"] } ] }
User can put in number for blocking i2c buses and addresses on certain bus.
Tested: Tested and verified systemd journal for function. Change-Id: Ibdb8dd8c3b9593a0c5e0d60e9e765dbf82938dd7 Signed-off-by: Bonnie Lo <Bonnie_Lo@wiwynn.com>
show more ...
|
d0eb1291 | 19-Apr-2023 |
Jonathan Doman <jonathan.doman@intel.com> |
Refactor unnecessary shared_ptr usage
No need to use shared_ptr for a uint64_t. Instead just use optional to check whether it was loaded from the JSON.
For devices without a Bus+Address specified,
Refactor unnecessary shared_ptr usage
No need to use shared_ptr for a uint64_t. Instead just use optional to check whether it was loaded from the JSON.
For devices without a Bus+Address specified, skip the deviceIsCreated() check and 5x retry, since there is no point to that for non-I2C devices.
Tested: Confirmed EM still creates/probes an i2c device exposed in an active config. For a test INA219 device exposed without an Address, confirmed that the kernel error message (i2c i2c-x: new_device: Can't parse I2C address) is only output once instead of 5 times.
Change-Id: Ib3778559235b19d9846b3bb973a795e82e37b123 Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
show more ...
|
3f98b5eb | 12-Apr-2023 |
Willy Tu <wltu@google.com> |
fru-device: Remove the use of mktime
mktime get the time in localtime and will mess up the time if the timezone != UTC. The FRU data should be the raw data in UTC and the reader will convert to loca
fru-device: Remove the use of mktime
mktime get the time in localtime and will mess up the time if the timezone != UTC. The FRU data should be the raw data in UTC and the reader will convert to localtime at their end.
This issue is detected when we change the timezone to PST/PDT with https://gerrit.openbmc.org/c/openbmc/openbmc/+/58293 and the FRU EEPROM time does not match the expected Mfg Date anymore.
Used the timestamp of 1/1/1996 UTC directly.
Data Reader: https://gerrit.openbmc.org/c/openbmc/phosphor-host-ipmid/+/58466
Tested: Fru EEPROM Mfg Time now is in the same (after timezone conversion) between the raw data and FRU output.
Change-Id: I48f9233ee96b676428ba9e9f9f6b34d3da74e612 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
6eb60972 | 14-Aug-2023 |
Matt Spinler <spinler@us.ibm.com> |
phys-topology: Add late add/remove support
The current physical topology code doesn't yet support adding entities late (in a different propertiesChangedCallback call) or removing an entity because:
phys-topology: Add late add/remove support
The current physical topology code doesn't yet support adding entities late (in a different propertiesChangedCallback call) or removing an entity because: - The Topology class is just scoped to postToDbus(), so when that is called again later with new cards it has no concept of existing parent cards so it will miss creating associations.
- There is nothing to tell the class when an entity is removed, so it never attempts to remove the association for that entity.
- When the containing/contained_by association is created it doesn't use the createInterface() function, so if that entity is removed later that association interface will be left on D-Bus.
To add support for entity adds and removes, this commit will: - Make the Topology class have a global scoped lifetime so it can remember entity relationships.
- Now that Topology will outlive postToDbus() calls, pass the getAssocs() method the list of boards being processed in the current postToDbus() incantation so it will only return the new associations.
- Use the createInterface() method when creating the association. This stores the interface in a map with the entity name so that when the entity is removed the interface will be removed along with all the other interfaces.
- When an entity is removed, only the board name is known. So pass the board name into addBoard() so the Topology class knows it, and add a Topology::remove() method and call it so it can remove the removed path from all of the connector maps.
Tested: - All of the containing/contained_by associations still show up on good path.
- Added new unit tests to cover the new functionality.
- When a downstream entity is added after EM does its initial D-Bus publish, the containing/contained_by association is now created.
- On an entity remove, there are no left over interfaces for the removed entity on D-Bus.
- When the removed entity is added back, the association is put back in place.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ie5daaca92c6d2e6e7abc408f3e67e948977581ef
show more ...
|
3d1909ae | 10-Aug-2023 |
Matt Spinler <spinler@us.ibm.com> |
Rename vars in postToDbus
The boardName var was actually a D-Bus path, so rename it to boardPath.
The actual name of the board was stored in the boardKey variable, so now that can be renamed to boa
Rename vars in postToDbus
The boardName var was actually a D-Bus path, so rename it to boardPath.
The actual name of the board was stored in the boardKey variable, so now that can be renamed to boardName.
Tested: Entity Manager still creates the same objects.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I282357bc84835925bbf3f09720787a7b7d4c3131
show more ...
|
2b3ed30c | 14-Apr-2023 |
Marvin Drees <marvin.drees@9elements.com> |
fru-device: retry with bytewise read
certain powersupplies, e.g. SuperMicro PWS-920P-SQ require that their FRU eeprom be read bytewise. otherwise, only garbage is read.
Tested: on Tyan S8030 board.
fru-device: retry with bytewise read
certain powersupplies, e.g. SuperMicro PWS-920P-SQ require that their FRU eeprom be read bytewise. otherwise, only garbage is read.
Tested: on Tyan S8030 board. FRU eeprom is now read correctly.
Change-Id: I36a0ce8d8f955d4fe3867dbd63fefda63b1a9b13 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
8af5d3c5 | 09-Aug-2023 |
Zhikui Ren <zhikui.ren@intel.com> |
fru-device:use noexcept std filesystem call
Update calls to use noexcept overload for is_symlink() and std::filesystem::directory_iterator::directory_iterator in fru-device This fixes service crash
fru-device:use noexcept std filesystem call
Update calls to use noexcept overload for is_symlink() and std::filesystem::directory_iterator::directory_iterator in fru-device This fixes service crash due to uncaught exception.
Tested: Same FRU device are discovered on a platform with the code change.
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com> Change-Id: I452e11d7713fdf09df47186ba6259ef2c6340019
show more ...
|
e7fb111c | 25-Apr-2023 |
Matt Simmering <matthew.simmering@intel.com> |
devices: Remove devices now managed by psusensor
Tested: With change https://gerrit.openbmc.org/c/openbmc/dbus-sensors/+/59761 these devices are being created, destroyed, and managed by psusensor.
devices: Remove devices now managed by psusensor
Tested: With change https://gerrit.openbmc.org/c/openbmc/dbus-sensors/+/59761 these devices are being created, destroyed, and managed by psusensor.
Change-Id: I685b9cacab68e0cb63b9fc1f06b4640f0164a099 Signed-off-by: Matt Simmering <matthew.simmering@intel.com>
show more ...
|
7329a225 | 07-Jul-2023 |
ankita prasad <ankita.prasad@intel.com> |
Increasing the bus read timeout for FRU
The FRU for NVME M2 SSD went missing after chassis power cycle. By increasing the I2C bus read timeout, allowing the service more time to read the FRU for the
Increasing the bus read timeout for FRU
The FRU for NVME M2 SSD went missing after chassis power cycle. By increasing the I2C bus read timeout, allowing the service more time to read the FRU for the device. Worst case measurement during 10 DC Cycles is 6 seconds.
Tested: Tested, the device does not disappear after the power cycle 1. ipmitool chassis power cycle 2. ipmitool fru list 3. The device appears once the chassis power is up
Change-Id: I11ba84bbd133184406548be9581bb22a4bbebe9c Signed-off-by: Ankita Prasad <ankita.prasad@intel.com>
show more ...
|
a591d6c0 | 21-Nov-2022 |
Tingting Chen <chentingting.2150@bytedance.com> |
Add support for PCA9537/INA226/IPSPS1 devices
Add below device type: PCA9537:add to support PCA9537 IO expander INA226:add to support INA226 VR chip IPSPS1:add to support IPSPS1 VR chip
Change-Id:
Add support for PCA9537/INA226/IPSPS1 devices
Add below device type: PCA9537:add to support PCA9537 IO expander INA226:add to support INA226 VR chip IPSPS1:add to support IPSPS1 VR chip
Change-Id: Icd250ba4bc963fee8a305bb9f1716d39772f6cc0 Signed-off-by: Tingting Chen <chentingting.2150@bytedance.com> Signed-off-by: Lei YU <yulei.sh@bytedance.com>
show more ...
|
5286afe2 | 12-Oct-2022 |
Hieu Huynh <hieuh@os.amperecomputing.com> |
FruDevice: Parsing Multirecord UUID
Extend entity-manager's FruDevice to read UUID from FRU EEPROM and update to dbus at MULTIRECORD_UUID. The Record Type ID is: 0x03 (Management Access Record) Sub-
FruDevice: Parsing Multirecord UUID
Extend entity-manager's FruDevice to read UUID from FRU EEPROM and update to dbus at MULTIRECORD_UUID. The Record Type ID is: 0x03 (Management Access Record) Sub-record Type is: 0x07 (System Unique ID)
Tested: 1. Get the UUID value: busctl get-property xyz.openbmc_project.FruDevice \ /xyz/openbmc_project/FruDevice/MB \ xyz.openbmc_project.FruDevice \ MULTIRECORD_UUID s "e74d8ad8-ed3b-11ec-ace5-34025a7001de"
Signed-off-by: Hieu Huynh <hieuh@os.amperecomputing.com> Change-Id: I61fbea9a5d90b8d857d49444775f80761386845b
show more ...
|
eb587b49 | 08-Mar-2023 |
Edward Lee <edwarddl@google.com> |
Create Item.System from Exposes List
Similar to how Item.BMC objects are created from { "Name": "BMC", "Type": "BMC" }
We should be able to create Item.System objects from the same config { "
Create Item.System from Exposes List
Similar to how Item.BMC objects are created from { "Name": "BMC", "Type": "BMC" }
We should be able to create Item.System objects from the same config { "Name": "host1", "Type": "System" }
This will allow creation of Item.System objects from the Board config.
Performed following tests: 1. busctl tree shows object created by EM 2. busctl introspect also shows that it implements the Item.System interface.
Tested: on QEMU
Change-Id: Ib9c22fa34ba7c8e00ab8f56ea58bee2bf32cdff9 Signed-off-by: Edward Lee <edwarddl@google.com>
show more ...
|
0e3bec8d | 01-Jun-2023 |
Jeff Lin <JeffLin2@quantatw.com> |
Add xdpe152c4 and raa229004 support
Tested: Tested on quanta system
Change-Id: I13321c94a69dd67a99e9a86c5c47199e3e98b73e Signed-off-by: Jeff Lin <JeffLin2@quantatw.com> |
016f1219 | 20-Feb-2023 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
devices: add MP2975 support
Add support for Monolithic Power Systems, Inc. (MPS) vendor dual-loop, digital, multi-phase controller MP2975.
Tested: tested on a custom board similar to Wilson City RV
devices: add MP2975 support
Add support for Monolithic Power Systems, Inc. (MPS) vendor dual-loop, digital, multi-phase controller MP2975.
Tested: tested on a custom board similar to Wilson City RVP. Driver is loaded sucessfully.
Change-Id: I3f6e5faf7933ab8f96f36bb62d236e88e69f9696 Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
df190619 | 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I07b444d4ae00b0fce52a846f2bff2e6b99fb971c Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
5e9a3055 | 13-Apr-2023 |
Saitwal, Meghan <meghan.saitwal@intel.com> |
devices: add PIC32 support
Add PIC32 into supported devices list. This is a PDB controller that is used to control Fans on PDB.
Tested: tested on a machine. Driver is loaded successfully.
Change-
devices: add PIC32 support
Add PIC32 into supported devices list. This is a PDB controller that is used to control Fans on PDB.
Tested: tested on a machine. Driver is loaded successfully.
Change-Id: I27d4ba4a345ac7dbc57f1402c45c302a6f6f653e Signed-off-by: Saitwal, Meghan <meghan.saitwal@intel.com>
show more ...
|
8d1ac3a2 | 02-Feb-2023 |
Matt Spinler <spinler@us.ibm.com> |
Ignore uninteresting IA/IR signals
Currently, entity-manager will parse every JSON file and do its full D-Bus scan and probe on any interfacesAdded or interfacesRemoved signal, without regard for wh
Ignore uninteresting IA/IR signals
Currently, entity-manager will parse every JSON file and do its full D-Bus scan and probe on any interfacesAdded or interfacesRemoved signal, without regard for which interface was added or removed.
Since the interfaces that are involved in the probes are known to entity-manager via the Probe statements in the JSON files, it is possible to only actually look for new or removed entities when the signals received contain one of those interfaces.
This implements something I saw suggested in an abandoned commit[1]: to extract the probe interfaces from the JSON files for use with the matches. Since the argX matches can only be done when the arg is a string, it can't build the interfaces into the match string, but it can check for a probe interface in the message payload before doing any real processing.
Note that the NameOwnerChanged signal doesn't contain interfaces, only well known bus names, so no interface checking can be done against it.
I imagine some further simplification could be done, such as not also parsing all the JSON files as part of propertiesChangedCallback(), or at least sharing more code, if desired.
[1] https://gerrit.openbmc.org/c/openbmc/entity-manager/+/56723
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Iaa8d30099459d8043a49879761241cf3590c3407
show more ...
|
aa497edf | 28-Feb-2023 |
Ed Tanous <edtanous@google.com> |
Use steady_timer instead of deadline timer
In boost, deadline_timer runs off the REALTIME clock, whereas steady_timer runs off the MONOTONIC clock. Because this timer should be based on a future ti
Use steady_timer instead of deadline timer
In boost, deadline_timer runs off the REALTIME clock, whereas steady_timer runs off the MONOTONIC clock. Because this timer should be based on a future time duration, not an exact calendar date, we should be using steady_timer here.
The difference between the two is subtle, and largely doesn't matter unless the date/time is set, in which case deadline_timer won't give the expected result.
Change-Id: I72e85a81b3a8e53161135befc6f42079ba36be6f Signed-off-by: Ed Tanous <edtanous@google.com>
show more ...
|
7fc486f5 | 05-Mar-2023 |
PavanKumarIntel <pavanx.kumar.martha@intel.com> |
Rescan the root bus when a new mux is added
FRU devices can be incorrectly associated with rootbus after BMC reset if a MUX was left open during shutdown. This prevents the scanning of the same ad
Rescan the root bus when a new mux is added
FRU devices can be incorrectly associated with rootbus after BMC reset if a MUX was left open during shutdown. This prevents the scanning of the same addresses on other legs of the MUX and few FRU devices are missing under FRU list. Rescan the rootbus before scanning the mux channel removes these devices from the rootbus. Next scan on the mux channel will find these devices on the correct logic bus.
Without Fix, when 5 HSBPs connected to system: before cold reset: |-/xyz/openbmc_project/FruDevice/BHS2U8X4U2HSBP |-/xyz/openbmc_project/FruDevice/BHS2U8X4U2HSBP_0 |-/xyz/openbmc_project/FruDevice/BHS2U8X4U2HSBP_1 |-/xyz/openbmc_project/FruDevice/BHS2U8X4U2HSBP_2 |-/xyz/openbmc_project/FruDevice/BHS2U8X4U2HSBP_3
after cold reset: |-/xyz/openbmc_project/FruDevice/BHS2U8X4U2HSBP |-/xyz/openbmc_project/FruDevice/BHS2U8X4U2HSBP_0 |-/xyz/openbmc_project/FruDevice/BHS2U8X4U2HSBP_1
Tested: Tested and verified that all FRU devices are scanning properly.
Change-Id: I470fe49084697a179d8f7b5241d342ef02964e39 Signed-off-by: PavanKumarIntel <pavanx.kumar.martha@intel.com>
show more ...
|
6e22c877 | 16-Feb-2023 |
Ed Tanous <edtanous@google.com> |
Make fru-device-resize option compile
This option hasn't compiled for a while since a few transitions. This commit makes it compile again, and takes a best guess. If there's bugs, we can close on
Make fru-device-resize option compile
This option hasn't compiled for a while since a few transitions. This commit makes it compile again, and takes a best guess. If there's bugs, we can close on them in another review, but at least it compiles now :)
Change-Id: Icfa928fa50e9f8c1fde3be516604317694800f3b Signed-off-by: Ed Tanous <edtanous@google.com>
show more ...
|
49a888c2 | 06-Mar-2023 |
Ed Tanous <edtanous@google.com> |
Move to boost::asio::post
This allows entity_manager to compile with BOOST_ASIO_NO_DEPRECATED set. It was functionally changed a few years ago, and is identical to the other behavior.
Change-Id: I6
Move to boost::asio::post
This allows entity_manager to compile with BOOST_ASIO_NO_DEPRECATED set. It was functionally changed a few years ago, and is identical to the other behavior.
Change-Id: I639bd43c7743629e7418d3974305eb52517c31b8 Signed-off-by: Ed Tanous <edtanous@google.com>
show more ...
|
34c3e016 | 06-Mar-2023 |
Ed Tanous <edtanous@google.com> |
Change io_service to io_context
This was renamed a while back in boost to be compliant with the std::executors proposal.
Change-Id: Ife6e8af8bc3882dfd803e33a76f0f78ea4e971f3 Signed-off-by: Ed Tanou
Change io_service to io_context
This was renamed a while back in boost to be compliant with the std::executors proposal.
Change-Id: Ife6e8af8bc3882dfd803e33a76f0f78ea4e971f3 Signed-off-by: Ed Tanous <edtanous@google.com>
show more ...
|
a5d25dcc | 26-Jan-2023 |
Andrew Jeffery <andrew@aj.id.au> |
Align source structure away from anti-patterns
The anti-patterns document comments on source structure, specifically on placing internal headers in a parallel subtree[1]. entity-manager is an exampl
Align source structure away from anti-patterns
The anti-patterns document comments on source structure, specifically on placing internal headers in a parallel subtree[1]. entity-manager is an example of violating this anti-pattern, so fix it.
[1]: https://github.com/openbmc/docs/blob/master/anti-patterns.md#placing-internal-headers-in-a-parallel-subtree
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I6c9739d1d532ea670e5ceb30044017c38e49eed3
show more ...
|
2eb6c6fd | 23-Jan-2023 |
P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com> |
Error handling for modulo operation
Add zero check for denominator as it could result in divide by zero exception.
Tested: Successfully able to handle the zero condition
Change-Id: I400b03db1fbf81
Error handling for modulo operation
Add zero check for denominator as it could result in divide by zero exception.
Tested: Successfully able to handle the zero condition
Change-Id: I400b03db1fbf81afdaa92243fa4af48d19807466 Signed-off-by: P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com>
show more ...
|