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 ...
|
c6fa6667 | 25-Apr-2023 |
Faisal Awada <faisal@us.ibm.com> |
psu-ng: Validate PSUs voltage input
Added logic to verify all power supplies have same input voltage. When detecting different input voltage an error is logged.
Tested: The power input verification
psu-ng: Validate PSUs voltage input
Added logic to verify all power supplies have same input voltage. When detecting different input voltage an error is logged.
Tested: The power input verification test was done on a system with two different input voltage (110v and 220v) in the following scenarios:
- Chassis Off/On. - Restart the PSU monitor. - Stop entity manager and stop PSU monitor then start PSU monitor after few seconds start entity manager. - AC power Off/On. - Hot-Plug power supply.
All scenarios listed above verified to report one error log.
Change-Id: I85cb06517cbcc82cd478aecca0d5ee01eb1cead1 Signed-off-by: Faisal Awada <faisal@us.ibm.com>
show more ...
|
b66ae50a | 01-Apr-2023 |
Faisal Awada <faisal@us.ibm.com> |
psu-ng: Dynamically assign the device driver name
Replaced hardcoded device driver name with a method to build the device driver name dynamically and assign it to a private data member.
The dynamic
psu-ng: Dynamically assign the device driver name
Replaced hardcoded device driver name with a method to build the device driver name dynamically and assign it to a private data member.
The dynamically built device driver name used during bind/unbind.
Tested the changes in simulation and actual system, compared journalctl entries of phosphor-psu-monitor with modified phosphor-psu-monitor. The following test were conducted and verified same journal output: - Verified driver name assigned correcty to PSU - Good Machine Path - Removed Power Supply - Inserted Power Supply - Missing Power Supply
Change-Id: Ic376d4ff058e9a2df1887468932faaa28d998960 Signed-off-by: Faisal Awada <faisal@us.ibm.com>
show more ...
|
1aaf9f85 | 22-Mar-2023 |
Matt Spinler <spinler@us.ibm.com> |
psu-ng: Remove power rating prop if PS not present
When the power is turned on, the input power rating properties were only being created or updated, and if the PS wasn't present nothing was being d
psu-ng: Remove power rating prop if PS not present
When the power is turned on, the input power rating properties were only being created or updated, and if the PS wasn't present nothing was being done. So if a PS was previously present but was removed, its property would stay on D-Bus.
Fix that by deleting the interface if the PS isn't present at the time of the check.
As PLDM is listening for this and it doesn't handle InterfacesRemoved signals, also set the value to zero before removing it so that they will at least see a value of zero for the missing PS.
At the time of this writing, the only consumer of this property was hostboot (the BIOS for IBM systems) via PLDM, and they were also checking if the PS was present before using it so technically they weren't broken, but it's good to fix it anyway because it's misleading.
Change-Id: I708014bdb12288d95e77028186b38a812f87e916 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
b40f04c2 | 20-Mar-2023 |
Matt Spinler <spinler@us.ibm.com> |
psu-ng: Change paths of SN/PN/FN files
The cffps2 power supply device driver started showing these fields under new names in a different directory. Eventually, the ones in the original location wil
psu-ng: Change paths of SN/PN/FN files
The cffps2 power supply device driver started showing these fields under new names in a different directory. Eventually, the ones in the original location will be removed.
Old path: /sys/kernel/debug/pmbux/hwmonX/cffps2 New path: /sys/kernel/debug/pmbux/hwmonX
Old name New Name ------------------------- fru mfr_model part_number mfr_revision header mfr_location serial_number mfr_serial
Tested: Compared the results of introspecting the PS inventory before and after the changes as the application puts these 4 fields into the inventory.
Change-Id: I0614396c28c08df22d57f88f8be1920d63a10132 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
a068f424 | 10-Mar-2023 |
Matt Spinler <spinler@us.ibm.com> |
psu-ng: Put input voltage rating on D-Bus
IBM systems must tell the BIOS (called hostboot) the power supply input voltage rating during a boot, where the rating is 110 or 220. This is done via PLDM
psu-ng: Put input voltage rating on D-Bus
IBM systems must tell the BIOS (called hostboot) the power supply input voltage rating during a boot, where the rating is 110 or 220. This is done via PLDM BIOS attributes where the attribute is backed by a D-Bus property.
This commit adds support for that by putting the input voltage rating of each PS on D-Bus using the Value property of the xyz.openbmc_project.Sensor.Value interface. The path is like /xyz/openbmc_project/sensors/voltage/ps0_input_voltage_rating.
$ busctl get-property xyz.openbmc_project.Power.PSUMonitor \ /xyz/openbmc_project/sensors/voltage/ps0_input_voltage_rating \ xyz.openbmc_project.Sensor.Value Value d 220
$ busctl get-property xyz.openbmc_project.Power.PSUMonitor \ /xyz/openbmc_project/sensors/voltage/ps0_input_voltage_rating \ xyz.openbmc_project.Sensor.Value Unit s "xyz.openbmc_project.Sensor.Value.Unit.Volts"
These D-Bus objects won't have any associations, unlike normal sensors, so they will not show up in any Redfish output as a sensor.
The interface is only created for present power supplies, and is only updated when the application starts up and when the boot starts.
If a power supply is hot added or removed after that, the D-Bus property doesn't need to be updated as hostboot has already consumed it.
Change-Id: I277516e8d86f1ba1a75b75fe76c67f192d911f88 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
9464c429 | 27-Feb-2023 |
George Liu <liuxiwei@inspur.com> |
Fix PSU status when BMC is in standby
Without this patch: Plug in the power supplies in any order, the power supply that is plugged in first will report a `PSU_KILL_Fault` in standby, but the proble
Fix PSU status when BMC is in standby
Without this patch: Plug in the power supplies in any order, the power supply that is plugged in first will report a `PSU_KILL_Fault` in standby, but the problem will be restored after the host is powered on.
With this patch: Regardless of whether it is in standby or host powered on, this problem disappears and it works fine.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I18e0e26a4922dd710e042048625da1cc8b08dd3c
show more ...
|
7f9288ce | 08-Dec-2022 |
Jim Wright <jlwright@us.ibm.com> |
psu-ng: Change logic to clear brownout
The chassis component only recognizes brownout clearing and performs auto power restart when the chassis state is off. Update the power supply application to c
psu-ng: Change logic to clear brownout
The chassis component only recognizes brownout clearing and performs auto power restart when the chassis state is off. Update the power supply application to conform to this expectation.
Tested with a power level disturbance (PLD) hardware tester through a matrix of varying durations and voltage percentages.
Signed-off-by: Jim Wright <jlwright@us.ibm.com> Change-Id: I9938e9b3e2edc3954cc14b330a517889317b4477
show more ...
|
0dbce568 | 12-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository.
prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository.
Change-Id: I53dc3bb17d5dcbb9b33fa3d0db62138f37cc8c0b Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
4ab86564 | 18-Nov-2022 |
Jim Wright <jlwright@us.ibm.com> |
psu-ng: Change detection of brownout errors
Brownout errors can occur such that the power supplies are able to recover but the chassis power good is lost and the system powers down. In these cases t
psu-ng: Change detection of brownout errors
Brownout errors can occur such that the power supplies are able to recover but the chassis power good is lost and the system powers down. In these cases the power supply application should continue to process the brownout condition so that the brownout error is logged and the auto power restart happens correctly. Use the power state and the chassis pgood properties from the power control service to allow this to happen.
The power supply driver or device may not latch the AC fault. Set an expiring indication that the AC fault occurred.
A power supply may not indicate the loss of AC and may only indicate the loss of power good. As long as at least one power supply indicates the AC loss, tolerate the pgood failure indications.
The net of the changes is that a brownout error will be issued when the chassis power good is lost, and all present power supplies indicate an AC failure or a power good failure, and at least one power supply indicates an AC failure.
Signed-off-by: Jim Wright <jlwright@us.ibm.com> Change-Id: I5a11746a036d0a66b11c76ec12784b8870fa306f
show more ...
|
1530024a | 17-Nov-2022 |
Jim Wright <jlwright@us.ibm.com> |
psu-ng: Fix Doxygen comments
Some comments intended to be Doxygen do not start with a double asterisk. Fix them.
Signed-off-by: Jim Wright <jlwright@us.ibm.com> Change-Id: I78ead797c4131ff850643ad0
psu-ng: Fix Doxygen comments
Some comments intended to be Doxygen do not start with a double asterisk. Fix them.
Signed-off-by: Jim Wright <jlwright@us.ibm.com> Change-Id: I78ead797c4131ff850643ad0c82660b231e9bbf8
show more ...
|
cefe85f2 | 18-Nov-2022 |
Jim Wright <jlwright@us.ibm.com> |
psu-ng: Suppress additional errors after brownout
After a brownout error occurs, multiple error conditions on multiple power supplies can be indicated. Suppress the additional error logs in favor of
psu-ng: Suppress additional errors after brownout
After a brownout error occurs, multiple error conditions on multiple power supplies can be indicated. Suppress the additional error logs in favor of the more comprehensive brownout error.
Signed-off-by: Jim Wright <jlwright@us.ibm.com> Change-Id: I2ed4c1e58185a82f9fc8bfdcb4ee380346351593
show more ...
|
5c186c8d | 17-Nov-2022 |
Jim Wright <jlwright@us.ibm.com> |
psu-ng: Use power control constants consistently
To simplify code and promote reuse, use power control constants consistently.
Signed-off-by: Jim Wright <jlwright@us.ibm.com> Change-Id: I6eaed534eb
psu-ng: Use power control constants consistently
To simplify code and promote reuse, use power control constants consistently.
Signed-off-by: Jim Wright <jlwright@us.ibm.com> Change-Id: I6eaed534eb48aa06a184848c19c12d6ac7a82518
show more ...
|
941b60df | 19-Oct-2022 |
Jim Wright <jlwright@us.ibm.com> |
psu-ng: Allow more than expected number of PS
When checking for a valid configuration, the number of present power supplies should not be less than the expected number. Allow the expected number or
psu-ng: Allow more than expected number of PS
When checking for a valid configuration, the number of present power supplies should not be less than the expected number. Allow the expected number or greater to be present without error.
Signed-off-by: Jim Wright <jlwright@us.ibm.com> Change-Id: I725f65fe8a799c9d2205baeb4f8081799c50ce7d
show more ...
|
983c989d | 12-Oct-2022 |
Shawn McCarney <shawnmm@us.ibm.com> |
psu-ng: Change max size of firmware version to 12
For IBM power supplies, the firmware version is read from a file created by the device driver.
The maximum number of version bytes read from the PS
psu-ng: Change max size of firmware version to 12
For IBM power supplies, the firmware version is read from a file created by the device driver.
The maximum number of version bytes read from the PSU is 6. However, the device driver formats the value as a hex string. Each byte results in two ASCII characters. Thus, the maximum ASCII string size is 12.
Change the maximum size of this value from 6 to 12 to avoid data truncation.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I92bbd5f4b4e19d96f7c9931da394d1c4186cd576
show more ...
|
f477eb76 | 28-Jul-2022 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Limit calling of missing PSU helper
Only call updateMissingPSUs() if we have an interface added for the supported configuration data, or new power supply device information.
Tested: Sim
psu-ng: Limit calling of missing PSU helper
Only call updateMissingPSUs() if we have an interface added for the supported configuration data, or new power supply device information.
Tested: Simulated Rainier 2S2U - Verify fewer "D-Bus property ... access failure exception" traces. - Verify proper operations during power on. - Run simulated input fault, and repair, verify errors. Rainier 2S2U - Apply patched binary. - Verify D-Bus traces - Poweron, verify lack of additional D-Bus traces.
Change-Id: I37833138e862ed910c072aa76491b0a413c18782 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
056935ca | 24-Jun-2022 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Use regex to replace invalid VPD data
Passing non-ASCII/unprintable VPD character data to D-Bus or other applications can lead to crashes or other unexpected behavior.
Change-Id: I9a70f4505
psu-ng: Use regex to replace invalid VPD data
Passing non-ASCII/unprintable VPD character data to D-Bus or other applications can lead to crashes or other unexpected behavior.
Change-Id: I9a70f4505d330652e36143395ff92902a203fa44 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
8393f467 | 28-Jun-2022 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Refactor reading VPD values to helper
Create a readVPDValue() helper function. Replace the repetitive try/catch, read size check, resize code with a call to that common helper.
Change-Id: I
psu-ng: Refactor reading VPD values to helper
Create a readVPDValue() helper function. Replace the repetitive try/catch, read size check, resize code with a call to that common helper.
Change-Id: Ia4ceec5fa4422c3c56ff4ab3ea369c193916a388 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
ad4aff23 | 21-Jun-2022 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Remove updateInventory in PSUManager initialize
This should not be needed, as the power supplies will update the inventory as they are created, or if a GPIO changes from missing to present.
psu-ng: Remove updateInventory in PSUManager initialize
This should not be needed, as the power supplies will update the inventory as they are created, or if a GPIO changes from missing to present.
Removing this should avoid updating the inventory twice whenever the process is started.
Change-Id: I0aac8fc7aa7d3ff1fec3b25e1153cd8f0e699527 Signed-off-by: Brandon Wyman <bjwyman@gmail.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 ...
|
6d469fd4 | 15-Jun-2022 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: PGOOD_DEGLITCH_LIMIT of five
Turns out that the (IBM) power supplies take up to around 3 seconds to get the PGOOD# bit in STATUS_WORD set to the good (0) state after the input power is withi
psu-ng: PGOOD_DEGLITCH_LIMIT of five
Turns out that the (IBM) power supplies take up to around 3 seconds to get the PGOOD# bit in STATUS_WORD set to the good (0) state after the input power is within range. Adjust the de-glitch value to avoid logging PGOOD errors for the power supplies, as they mostly ride through the momentary drops in the input power.
Use PGOOD_DEGLITCH_LIMIT instead of DEGLITCH_LIMIT for the pgoodFault.
Tested: Rainier 2S4U 1. Drop outlet power for 0.5 seconds, verify no 110015F1. 2. Drop outlet power for 1 second, verify no 110015F1. 3. Drop outlet power for 1.5 seconds, verify no 110015F1. Rainier 2S2U 1. Drop outlet power for 1 second, verify no 110015F1. 2. Drop outlet power for 5 seconds, verify 110015F0 (VIN_UV) IS logged. 3. Drop outlet power for 1.5 seconds, verify no 110015F1. Everest (powersupply0 unplugged, powersupply3 missing) 1. Drop outlet power for 0.5 seconds, verify no 110015F1. 2. Drop outlet power for 1 second, verify no 110015F1. 3. Drop outlet power for 1.5 seconds, verify no 110015F1. 4. Drop outlet power for 3 seconds, verify 110015F0 IS logged. 5. Drop all outlet power for 5 seconds, verify 110000AC.
Change-Id: I6ba12209e6c84548fec036101ca02d857ed900f6 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
9bc5f768 | 12-Jul-2022 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Fix false brownout fault logging
The hasVINUVCount only matters if a power supply is present. Issues noticed on an internal system test on Rainier 1S4U, during the replacement of a power sup
psu-ng: Fix false brownout fault logging
The hasVINUVCount only matters if a power supply is present. Issues noticed on an internal system test on Rainier 1S4U, during the replacement of a power supply with a fan fault, a 110000AC PEL (brownout) was logged.
If we have two power supplies total, then have a fault on one of them, in the act of replacing it, we will remove input voltage, and then remove the power supply. If the power supply is missing, and it previously had an input under-voltage fault, it does not really count against a brownout anymore, other than now being missing. We already account for present power supplies, the issue appears to be with counting VIN_UV faults against missing power supplies. Only count a power supply as VIN_UV faulted if it is present.
Tested: Simulated Rainier 2S2U 1. Fake fan fault psu0. 2. Fake VIN_UV fault psu0 (remove power). 3. Remove psu0 4. Install psu0, apply power (clear all faults). 5. Verify no brownout fault logged. 6. Repeat for psu1 Simulated Rainier 2S2U Re-run brownout fault script. Verify brownout fault logged. Real Rainier 1S4U 1. Remove psu2. 2. Insert obstruction to block fan. 3. Install psu2. 4. Wait for PSU fan fault to be logged. 5. Remove psu2. 6. Remove fan obstruction from PSU. 7. Install psu2. 8. Verify no brownout fault logged. 9. Repeat for psu3.
Change-Id: I809112ca0afc0b8294b62a62cdcc147b51ccc6e6 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
aca86d05 | 10-Jun-2022 |
Jim Wright <jlwright@us.ibm.com> |
psu-ng: Adjust power on monitoring window
Monitor both pgood and state properties from the power control d-bus interface in order to adjust the window in which power supply monitoring is done. Facto
psu-ng: Adjust power on monitoring window
Monitor both pgood and state properties from the power control d-bus interface in order to adjust the window in which power supply monitoring is done. Factor in both properties to determine when system is in power failure and adjust which power supply failures are monitored in that window.
Signed-off-by: Jim Wright <jlwright@us.ibm.com> Change-Id: Ib13c9cc6689f0b67c4d396eabfcf50dcab155e9b
show more ...
|
9252b7e3 | 10-Jun-2022 |
Shawn McCarney <shawnmm@us.ibm.com> |
psu-ng: Only log missing errors for required PSUs
If a power supply unit (PSU) is missing, only log an error if it is required by the current SupportedConfiguration.
EntityManager provides one or m
psu-ng: Only log missing errors for required PSUs
If a power supply unit (PSU) is missing, only log an error if it is required by the current SupportedConfiguration.
EntityManager provides one or more D-Bus objects that implement the SupportedConfiguration interface. This interface specifies a PSU model, input voltage, and required number of PSUs.
EntityManager also provides one or more D-Bus objects that represent possible PSU devices that could exist in the system.
If the number of required PSUs is less than the number of possible PSUs, it is not an error for the extra PSUs to be missing.
Add logic to the power supply monitoring application to determine if a missing PSU is required before logging an error.
Tested: * Test plan documented at https://gist.github.com/smccarney/ba99ac808503b477aa056e7f4afe2ae1
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I2e8d147ad88461077da497b26fcc309966e04b45
show more ...
|