#
f5402197 |
| 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I7b90380845efee6bf6a1fe342a793d71aa9ff181 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
768d2269 |
| 09-Jul-2024 |
Shawn McCarney <shawnmm@us.ibm.com> |
Move to std::format
The OpenBMC project is moving from the fmt project to the built-in std::format() support.
Update source files and meson files to move to std::format().
Tested: * Verified build
Move to std::format
The OpenBMC project is moving from the fmt project to the built-in std::format() support.
Update source files and meson files to move to std::format().
Tested: * Verified builds cleanly in local CI * Verified all automated tests run successfully * Verified builds cleanly in bitbake * Verified an affected phosphor-psu-monitor journal message still works correctly. * Verified an affected phosphor-power-sequencer journal message still works correctly.
Change-Id: I97b63cf9d132e2b6f173afb30953a9083d68133f Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
show more ...
|
#
e4fa48c2 |
| 19-Feb-2024 |
George Liu <liuxiwei@ieisystem.com> |
phosphor-power-supply: Fix code security vulnerabilities
Using the invpath variable after calling std::move(invpath) may result in unexpected or undefined behavior.
Signed-off-by: George Liu <liuxi
phosphor-power-supply: Fix code security vulnerabilities
Using the invpath variable after calling std::move(invpath) may result in unexpected or undefined behavior.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: Iad80d8844d99a0f1760d7f0f7ea354f001c3d2be
show more ...
|
#
592bd27c |
| 30-Aug-2023 |
Matt Spinler <spinler@us.ibm.com> |
psu-ng: Add peak input power sensor for some PSs
Some models of the ibm-cffps power supplies support an 'input history' command that reports 30 second maximum and average input power values. The cod
psu-ng: Add peak input power sensor for some PSs
Some models of the ibm-cffps power supplies support an 'input history' command that reports 30 second maximum and average input power values. The code was currently putting those on an 'org.open_power' D-Bus interface so that the history of those values could be captured in a single D-Bus call.
Now that there is a real telemetry feature in Redfish that can capture the history of a single sensor value, we can drop the custom D-Bus interface and just use the normal Sensor.Value interface that contains the most recent maximum value from the input history command, The sensor name will be 'psX_input_power_peak' where X is the PS instance number.
The average input power telemetry will now just be obtained from the psX_input_power sensor provided by phosphor-hwmon so an equivalent sensor to the peak isn't needed here.
This commit will add support for putting the new sensor on D-Bus, and a future one will remove the previous input history support.
Like sensors in other daemons, it will be set to not available when a PS is removed, and not functional when it has an access problem. There will be associations to the parent chassis and to the power supply so it will show up in Redfish output with the other sensors.
This commit did remove one of the input history testcases, as trying to get the right sequence of EXPECT_CALLs would get tricky when both the old and new are running together.
Tested: - New sensor shows up when PS is present and supports it. - All interfaces on the object path are correct. - Sensor value matches what org.open_power Max property had. - Works correctly when: - PS is missing on startup - PS is removed - Previously present PS is replaced.
Change-Id: Id9c33aa753c9af32880a0cc874b39c113222568f Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
#
48781aef |
| 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: If66f68c96df4baf8dc07abf8729a3cb7657e932d Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
06594229 |
| 01-May-2023 |
Matt Spinler <spinler@us.ibm.com> |
psu-ng: Fix chassis association call
The association name from a power supply to its chassis changed from 'chassis' to 'powering', so change that in the code.
Also update the code to find the assoc
psu-ng: Fix chassis association call
The association name from a power supply to its chassis changed from 'chassis' to 'powering', so change that in the code.
Also update the code to find the association using the new GetAssociatedSubTreePaths mapper method which is like the existing GetSubTreePaths but also ensures the results are an endpoint of the passed in association path. This way if the 'powering' association is used to show the power supply powers other things it will still work.
Change-Id: I9076a6b1502ba43a29404a191bd8bc56a9c5df45 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
#
7354ce62 |
| 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: Ief05bd757cffb1453e058a719ee4b060861752e7
show more ...
|
#
18a24d92 |
| 19-Apr-2022 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: INPUT_HISTORY syncHistory
Add in the function that syncs the power supply input history data between all the installed power supplies.
Use the GPIO line name instead of gpiochip and number.
psu-ng: INPUT_HISTORY syncHistory
Add in the function that syncs the power supply input history data between all the installed power supplies.
Use the GPIO line name instead of gpiochip and number. Use libgpiod via helper utility. Create a toggleLowHigh() to use for synchronizing the input history.
Add in indicator and helper functions to indicate a syncHistory is needed if a power supply goes from missing to present.
Trace when syncHistory is called. This should be infrequent enough that I do not think it would be a problem.
Initial testing on Rainier 2S2U did not need a lengthy delay between lowering and raising the power-ffs-sync-history GPIO, but testing on Rainier 2S4u required a longer delay.
Depends-On: Ib1ac2456f7f715360d089dfa4b6b379b516439ab
Change-Id: I022806155139d70fb4a42cc27eb9f279f6a3aedc Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
#
ca1e9ea1 |
| 18-Feb-2022 |
Matt Spinler <spinler@us.ibm.com> |
psu-ng: Handle health rollup based on availability
When a PSU is set to not available, create an association between the power supply and its chassis as a way to 'roll up' the health status to that
psu-ng: Handle health rollup based on availability
When a PSU is set to not available, create an association between the power supply and its chassis as a way to 'roll up' the health status to that chassis. It looks like:
<chassis>/critical endpoints: <power supply> <power supply>/health_rollup endpoints: <chassis>
There is Redfish code that look at the endpoints in that chassis association object to determine if the chassis health is OK or not.
Note that some systems, such as IBM's, have other code that will fill in that association when it is called out in an event log, which is why this code doesn't have to do it for every single fault.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I262dd738ebadb72aa207011941066fc282bfe4df
show more ...
|
#
0975eaf4 |
| 14-Feb-2022 |
Matt Spinler <spinler@us.ibm.com> |
psu-ng: Add Availability support to power supplies
Add support for determining if a power supply is considered 'available' or not, and set the Available D-Bus property on the xyz.openbmc_project.Sta
psu-ng: Add Availability support to power supplies
Add support for determining if a power supply is considered 'available' or not, and set the Available D-Bus property on the xyz.openbmc_project.State.Decorator.Availability interface with the result.
A power supply is considered unavailable if any of the following are true: - it isn't present - there is a input fault active - there is a Vin UV fault active - there is a PS KILL fault active - there is a Iout OC fault active
The latter four faults are the faults where it can't provide good output power, hence the PS is unavailable. These faults also don't call out the power supply directly, so the Functional property won't get set to false, unlike other faults.
The Available D-Bus property is then able to be used in Redfish responses for the heath and state properties in the power supply schema.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I349eddb8c052cf238276c832af0dde9e49f6d3f0
show more ...
|
#
52245b69 |
| 13-Sep-2021 |
Adriana Kobylak <anoo@us.ibm.com> |
psu-ng: Implement gpio write function
Implement a gpio write function to allow writing to gpios via the libgpiod bindings. The bindings allow to set the desired gpio value by passing it to the line
psu-ng: Implement gpio write function
Implement a gpio write function to allow writing to gpios via the libgpiod bindings. The bindings allow to set the desired gpio value by passing it to the line request call.
Add the ability to pass flags as defined in gpiod.hpp so that the caller can specify options such as FLAG_OPEN_DRAIN.
Change-Id: Ia7329a17c46f4f1fda0b66f795f123c8524a1be5 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
3ca062ae |
| 20-Oct-2021 |
Adriana Kobylak <anoo@us.ibm.com> |
psu-ng: Change the GPIOReader class to GPIOInterface
The GPIOReader class only contains a read function. A new write function will be added so it makes sense for the class to be named Interface inst
psu-ng: Change the GPIOReader class to GPIOInterface
The GPIOReader class only contains a read function. A new write function will be added so it makes sense for the class to be named Interface instead of Reader. Change GPIOReader to GPIOInterface, and change the base class from GPIOInterface to GPIOInterfaceBase.
Tested: Ran CI.
Change-Id: I2a4abdabe0136a7f73337f0d054d2dd79712f53c Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
d8b8cb15 |
| 15-Jul-2021 |
B. J. Wyman <bjwyman@gmail.com> |
psu-ng: Add accessor to get GPIO line name
Update the utilities to give the line name for a GPIO.
Add accessor to power supply class to get the name of the presence GPIO line.
Signed-off-by: B. J.
psu-ng: Add accessor to get GPIO line name
Update the utilities to give the line name for a GPIO.
Add accessor to power supply class to get the name of the presence GPIO line.
Signed-off-by: B. J. Wyman <bjwyman@gmail.com> Change-Id: Ic10fd81c6de024dbcb27088c5935ac9947af9465
show more ...
|
#
681b2a36 |
| 20-Apr-2021 |
B. J. Wyman <bjwyman@gmail.com> |
psu-ng: Add in ability to get presence via GPIO
The device tree and entity-manager (D-Bus) properties have the power supply GPIO presence lines named, so we can use those GPIO line names to find the
psu-ng: Add in ability to get presence via GPIO
The device tree and entity-manager (D-Bus) properties have the power supply GPIO presence lines named, so we can use those GPIO line names to find the GPIO device to read for determining power supply presence.
Some systems have the power supply presence lines in a gpio-keys section (notably IBM Rainier). To facilitate continued function while running with a device tree that has not removed those device tree entries, allow for a fallback to the old inventory D-Bus propertiesChanged or interfaceAdded matches for presence.
Change-Id: I5002aa62e5b460463cc26328c889a3786b467a3c Signed-off-by: B. J. Wyman <bjwyman@gmail.com>
show more ...
|
#
3f1242f3 |
| 28-Jan-2020 |
Brandon Wyman <bjwyman@gmail.com> |
Update analyze function to check STATUS_WORD
The STATUS_WORD PMBus command response will be the start of the power supply fault analysis. Update the analyze() function to read its value and process
Update analyze function to check STATUS_WORD
The STATUS_WORD PMBus command response will be the start of the power supply fault analysis. Update the analyze() function to read its value and process (select) fault bits.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: If7274ad237c0604a56008676ae64804a5fd2854e
show more ...
|