History log of /openbmc/phosphor-power/phosphor-regulators/ (Results 101 – 125 of 305)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
de0fd44f10-Feb-2021 Shawn McCarney <shawnmm@us.ibm.com>

regulators: Improve docs for compare_vpd

Improve the documentation for the compare_vpd JSON action:
* Explain what "VPD" is
* Provide an example use case

Signed-off-by: Shawn McCarney <shawnmm@us.i

regulators: Improve docs for compare_vpd

Improve the documentation for the compare_vpd JSON action:
* Explain what "VPD" is
* Provide an example use case

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: Iafb3e47293c678a2ea6923438253e2c60f35e8e2

show more ...

45907cc705-Feb-2021 Shawn McCarney <shawnmm@us.ibm.com>

regulators: Complete compare_vpd action

Complete implementation of the compare_vpd action in the JSON
configuration file. For more information about this action see
https://github.com/openbmc/phosp

regulators: Complete compare_vpd action

Complete implementation of the compare_vpd action in the JSON
configuration file. For more information about this action see
https://github.com/openbmc/phosphor-power/blob/master/phosphor-regulators/docs/config_file/compare_vpd.md

Implement the execute() method of the CompareVPDAction class. Obtain
the actual VPD keyword value from the VPD service and compare it with
the expected value.

Also improve doxygen for the execute() method of the
ComparePresenceAction class.

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: Ieb93806245babe6782fef95209bed8eed5b32578

show more ...

4e0402cb05-Feb-2021 Shawn McCarney <shawnmm@us.ibm.com>

regulators: Add VPD service

The regulators application needs to obtain VPD (Vital Product Data)
keyword values.

Sometimes regulator configuration and monitoring varies depending on
hardware type or

regulators: Add VPD service

The regulators application needs to obtain VPD (Vital Product Data)
keyword values.

Sometimes regulator configuration and monitoring varies depending on
hardware type or version. VPD keyword values can provide this
information about the hardware.

Add a new class to obtain hardware VPD from the D-Bus
xyz.openbmc_project.Inventory.Decorator.Asset interface.

Also define an abstract base class and a mock implementation to
enable use of gmock in test cases related to VPD.

Tested:
* Verified VPD values were successfully obtained from D-Bus.
* Verified VPD values were cached.
* Tested where object path was invalid.
* Tested where keyword was invalid.
* Verified cached VPD values were cleared when machine powered on.
* For the complete test plan, see
https://gist.github.com/smccarney/519a54353361e28b1d25f5783c15f471

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: Id08e8bca8db6421d46669c495e8a9432e45a1fd6

show more ...

3cd2b40730-Jan-2021 Shawn McCarney <shawnmm@us.ibm.com>

regulators: Handle expected D-Bus exceptions

When hardware is not present, it can appear multiple ways on D-Bus:
* Object path does not exist
* Object path exists, but Inventory.Item interface not i

regulators: Handle expected D-Bus exceptions

When hardware is not present, it can appear multiple ways on D-Bus:
* Object path does not exist
* Object path exists, but Inventory.Item interface not implemented
* Inventory.Item interface implemented with Present value of false

The first two cases result in a D-Bus exception being thrown when trying
to obtain the value of the Present property.

Enhance the DBusPresenceService class to catch these exceptions and
treat them as a false Presence value.

Tested:
* Tested where hardware present
* Tested where hardware not present
* Object path and interface/property exist
* Object path exists
* Object path does not exist
* For full test plan, see
https://gist.github.com/smccarney/d3d7384700abcc5abf436e2b859d98e5

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I543a4c16984dea3657b8024dedd1060dda4319e2

show more ...

48033bf627-Jan-2021 Shawn McCarney <shawnmm@us.ibm.com>

regulators: Only configure/monitor if present

Enhance the configure and monitor operations to only be performed if the
device is present.

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-I

regulators: Only configure/monitor if present

Enhance the configure and monitor operations to only be performed if the
device is present.

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I57fed4f92937b808ac6f8c37899e28d6009747e6

show more ...

9bd94d3625-Jan-2021 Shawn McCarney <shawnmm@us.ibm.com>

regulators: Clear cached hardware data during boot

Clear cached data about hardware devices when the system is powering on
(booting).

While the system was powered off, hardware devices containing v

regulators: Clear cached hardware data during boot

Clear cached data about hardware devices when the system is powering on
(booting).

While the system was powered off, hardware devices containing voltage
regulators could have been added, removed, or replaced. Cached hardware
data might now be invalid.

Tested:
* Ran automated test cases
* Verified that cached data is cleared without errors during boot
* When config file was found and loaded
* When no config file was found

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: Ief45fe32ddcb122847d201e89ca1267526a87e3c

show more ...

589c181a14-Jan-2021 Shawn McCarney <shawnmm@us.ibm.com>

regulators: Obtain config file name from D-Bus

Determine the correct JSON configuration file name based on the values
in the D-Bus compatible systems interface.

Also support a default configuration

regulators: Obtain config file name from D-Bus

Determine the correct JSON configuration file name based on the values
in the D-Bus compatible systems interface.

Also support a default configuration file name for systems that do not
use the compatible systems interface.

Tested:
* Verified correct config file name found on Rainier system
* When phosphor-regulators starts before entity-manager
* When phosphor-regulators starts after entity-manager
* Verified correct config file name found on Everest system
* When phosphor-regulators starts before entity-manager
* When phosphor-regulators starts after entity-manager
* Error cases
* For full test plan see
https://gist.github.com/smccarney/2dbc81aa55e3fa6250f0827eab62fff7

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I98902116b55297085ca3c40ce48f40972c3a3827

show more ...

860d51af21-Jan-2021 Shawn McCarney <shawnmm@us.ibm.com>

regulators: Document config file name options

Document the options for naming the regulators JSON configuration file.
A config file can have the default file name, or it can have a file name
based o

regulators: Document config file name options

Document the options for naming the regulators JSON configuration file.
A config file can have the default file name, or it can have a file name
based on the values of the IBMCompatibleSystem D-Bus interface provided
by Entity Manager.

Rename the example config file to the default file name.

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I8398d8c90e85731ab05c6aeaff3a5ea6e91114f8

show more ...

e35831f612-Jan-2021 Shawn McCarney <shawnmm@us.ibm.com>

regulators: Initial JSON config file for Everest

Create an initial JSON configuration file for IBM Everest systems. File
does not yet contain any device information.

Signed-off-by: Shawn McCarney

regulators: Initial JSON config file for Everest

Create an initial JSON configuration file for IBM Everest systems. File
does not yet contain any device information.

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I1cf0b0843145c3190d780d190e6ef0cdd5150b16

show more ...

462e592619-Nov-2020 Bob King <Bob_King@wistron.com>

regulators: Complete PresenceDetection class

Complete implementation of the PresenceDetection class. Implement the
execute() method that executes one or more actions to determine if a
device is pre

regulators: Complete PresenceDetection class

Complete implementation of the PresenceDetection class. Implement the
execute() method that executes one or more actions to determine if a
device is present.

Cache the results so that subsequent calls to execute() will return the
cached value. Executing the actions may be expensive, requiring one or
more D-Bus calls.

Provide a clearCache() method to be called on each boot to clear the
cached value.

Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: Ie0e3dfde10f2df8ca8b56ec14ce723f356e97dfc

show more ...

49e90d3a10-Nov-2020 Bob King <Bob_King@wistron.com>

regulators: Implement ComparePresenceAction class

The ComparePresenceAction::execute() method reads the presence value
using the Services->getPresenceService()->isPresent() method.
Then it compares

regulators: Implement ComparePresenceAction class

The ComparePresenceAction::execute() method reads the presence value
using the Services->getPresenceService()->isPresent() method.
Then it compares the actual value to the expected value.
It returns true if they match and false if they don't.

Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: Ie6a17191313b2c80a0ecd7a7d7357448985d0673

show more ...

73eaceeb23-Oct-2020 Bob King <Bob_King@wistron.com>

regulators: Add Services to ActionEnvironment

Add Services& services to the ActionEnvironment constructor.
Add Services& getServices() to the ActionEnvironment class.
Add Services& services to the A

regulators: Add Services to ActionEnvironment

Add Services& services to the ActionEnvironment constructor.
Add Services& getServices() to the ActionEnvironment class.
Add Services& services to the ActionEnvironment class.
Update the ActionEnvironment test for the new getServices() method.
Update classes that create an ActionEnvironment.
Update all affected testcases that create an ActionEnvironment.

Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: I12ac9f301746965aa282b69432a71ad525739c9e

show more ...

a76898f113-Oct-2020 Bob King <Bob_King@wistron.com>

regulators: Enhance config file parser

Enhance JSON config file parser to convert relative inventory paths to
absolute form.

Tested:
Run local CI with -Dlong-tests=enabled to enable tests for
valid

regulators: Enhance config file parser

Enhance JSON config file parser to convert relative inventory paths to
absolute form.

Tested:
Run local CI with -Dlong-tests=enabled to enable tests for
validate-regulators-config.py.

Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: I80237a673f9c5918898db15363847722141388e6

show more ...

863cb05929-Oct-2020 Bob King <Bob_King@wistron.com>

regulators: Validate config files during CI

Let the validate-regulators-config.py tool run during CI on all the
files in the config_files directory to make sure they are valid.

Tested:
* Test inter

regulators: Validate config files during CI

Let the validate-regulators-config.py tool run during CI on all the
files in the config_files directory to make sure they are valid.

Tested:
* Test interaction between this script and CI:
* Verify an exit code of 0 causes CI to pass
* Verify a non-zero exit code causes CI to fail
* Test with one config file:
* Test where valid; exit code should be 0
* Test where invalid; exit code should be non-zero
* Test with multiple config files:
* Test where all valid; exit code should be 0
* Test where first file checked is invalid; exit code should be
non-zero
* Test where last file checked is invalid; exit code should be
non-zero

Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: I4babd409170e3eb6fcc36c8fdd5a34be41d55edb

show more ...

d58858ca04-Nov-2020 Shawn McCarney <shawnmm@us.ibm.com>

regulators: Add hardware presence service

The regulators application needs to determine whether hardware is
present or absent. Some voltage regulators are optional, and
configuration should only be

regulators: Add hardware presence service

The regulators application needs to determine whether hardware is
present or absent. Some voltage regulators are optional, and
configuration should only be performed if the regulator is present.

Add a new class to obtain hardware presence data from the D-Bus
xyz.openbmc_project.Inventory.Item interface.

Also define an abstract base class and a mock implementation to enable
use of gmock in test cases related to hardware presence.

Tested:
* Tested where inventory path is present
* Tested where inventory path is not present
* Tested where inventory path is invalid and results in an exception
* Verified that mock implementation could be used in a gmock test case
* Full test plan available at
https://gist.github.com/smccarney/2b6ea6ecbbeaf5a8b1793e2321799972

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: Ia25a92815efc506c3ef4ac72844c17120c4ce9b7

show more ...

b7552f0c15-Oct-2020 Bob King <Bob_King@wistron.com>

regulators: Improve config file validator

Improve error checking in config file validator.

Add checking if config file does not exist, config file is not readable,
and config file is not a JSON fil

regulators: Improve config file validator

Improve error checking in config file validator.

Add checking if config file does not exist, config file is not readable,
and config file is not a JSON file.
Add checking if schema file does not exist, schema file is not readable,
and schema file is not a JSON file.

Tested:
Run local CI with -Dlong-tests=enabled to enable tests for
validate-regulators-config.py.

1/7 phosphor-regulators-tests OK 32.49s

Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: I5a84949e89be004a20a04c00d16b49286cb42f37

show more ...

76b7643f15-Oct-2020 Shawn McCarney <shawnmm@us.ibm.com>

regulators: Store journal messages in error logs

The Journal::getMessages() method was recently implemented and merged.
This method can be used to obtain the N most recent journal messages
from a sp

regulators: Store journal messages in error logs

The Journal::getMessages() method was recently implemented and merged.
This method can be used to obtain the N most recent journal messages
from a specified application.

Modify the error logging code to use this new method. A method call was
already in the code, but it was commented out until the new method
became available.

The journal messages are stored in FFDC files that are eventually stored
in the error log as additional debug data.

Tested:
* Test where works
* Verify returned messages are correct
* Verify returned messages are stored in error log
* Journal contains 0 messages for the specified application
* Journal contains < 30 messages for the specified application
* Journal contains > 30 messages for the specified application
* Test where fails
* Verify exception is written to journal
* Verify keeps looping to obtain journal messages from other applications

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I2cc07e19daa61a614611305d60fd318c48826d96

show more ...

ca08a79030-Sep-2020 Bob King <Bob_King@wistron.com>

regulators: Add getMessages method

Add getMessages method. It gets the journal messages that have the
specified field set to the specified value.

Tested:
* Get field "_PID" with value "1".
* Get

regulators: Add getMessages method

Add getMessages method. It gets the journal messages that have the
specified field set to the specified value.

Tested:
* Get field "_PID" with value "1".
* Get field "_SYSTEMD_UNIT" with value "init.scope".
* Get a field that does not exist and return vector size is 0.
* max parameter is 0 and return all messages.
* max parameter is less than number of messages in journal
and return max number of messages.
* max parameter is more than number of messages in journal
and return all messages

Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: I6a9410b5509b3044c1de103e71276e8e7c241fa6

show more ...

35a7d0ca09-Oct-2020 Shawn McCarney <shawnmm@us.ibm.com>

regulators: Update inventory paths in docs/example

Updated the JSON configuration file documentation and example to clarify
that inventory paths are relative.

JSON configuration file documentation

regulators: Update inventory paths in docs/example

Updated the JSON configuration file documentation and example to clarify
that inventory paths are relative.

JSON configuration file documentation changes:
* Described how inventory paths are relative to the root
/xyz/openbmc_project/inventory.
* Removed leading slashes from the example inventory paths.

Example JSON configuration file changes:
* Remove leading slashes from the inventory paths.

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: Iec602f76e663c120b40017f3d12fb526b93c0ce5

show more ...

18a8e49120-Aug-2020 Bob King <Bob_King@wistron.com>

regulators: Delete journal.cpp and mock_journal.cpp

Delete the file journal.cpp, it is no longer needed.

Delete the file mock_journal.cpp, it is no longer needed.

Delete log() method in exception_

regulators: Delete journal.cpp and mock_journal.cpp

Delete the file journal.cpp, it is no longer needed.

Delete the file mock_journal.cpp, it is no longer needed.

Delete log() method in exception_utils.cpp, it is no longer
needed.

Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: Ifb9d3524f2b9c7f9b266e03ef52e1cba0a49c08d

show more ...

d692d6df14-Sep-2020 Bob King <Bob_King@wistron.com>

regulators: Modify close() to use services

Modify the Device::close() method in the Device class to have a new
first parameter: Services& services.

Modify Device::close() to log messages using the

regulators: Modify close() to use services

Modify the Device::close() method in the Device class to have a new
first parameter: Services& services.

Modify Device::close() to log messages using the new Journal
interface.

Modify the Chassis::closeDevices() method in the Chassis class to
have a new first parameter: Services& services.

Modify Chassis::closeDevices() to log messages using the new
Journal interface.

Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: I2a07417d6f7470685f2c27c878ef7936e9f1aa8a

show more ...

1df5954c24-Sep-2020 Shawn McCarney <shawnmm@us.ibm.com>

regulators: Implement D-Bus error logging

Implemented the DBusErrorLogging class. This class creates error logs
using the D-Bus CreateWithFFDCFiles method.

Updated the abstract base class, ErrorLo

regulators: Implement D-Bus error logging

Implemented the DBusErrorLogging class. This class creates error logs
using the D-Bus CreateWithFFDCFiles method.

Updated the abstract base class, ErrorLogging, to have the correct
virtual method parameters. The methods were previously defined with no
parameters as a temporary measure.

Also updated the MockErrorLogging class to have the correct virtual
method parameters.

Tested:
* Verified that all the log*Error() methods create an error log of the
correct type.
* Verified that created error logs have the expected:
* property/field values
* callouts with associated VPD
* User Data sections containing debug data stored in FFDC files
* Tested where creating an FFDC file fails.
* Tested where calling CreateWithFFDCFiles method fails.
* Tested where removing an FFDC file fails.
* Verified that if a failure occurs, it is written to the system
journal but does not result in a second error log (since that could
lead to an infinite loop).
* Verified that temporary FFDC files are removed even if creating the
error log fails.

Full Test Plan:
* https://gist.github.com/smccarney/60ecbc018c55a5d13661bda8ee256d61

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I2837fc68dfbad2d89193a147222f1c51d9b1aad3

show more ...

f3633f6302-Sep-2020 Shawn McCarney <shawnmm@us.ibm.com>

regulators: Create FFDCFile class

Create C++ class for a file that contains FFDC (first failure data
capture) data.

This class is used to store FFDC data in an error log. The FFDC data is
passed t

regulators: Create FFDCFile class

Create C++ class for a file that contains FFDC (first failure data
capture) data.

This class is used to store FFDC data in an error log. The FFDC data is
passed to the error logging system using a file descriptor.

The constructor creates the file and opens it for both reading and
writing. The getFileDescriptor() method returns the file descriptor for
reading/writing the file. The destructor closes and deletes the file.

Also moved the test utility functions makeFileUnRemovable() and
makeFileRemovable() to test_utils.hpp so they can be used by multiple
testcases.

Change-Id: Iddef488a28e83a0df7e7f6955c3217ecb3ec2d51

show more ...

8a55292d05-Aug-2020 Bob King <Bob_King@wistron.com>

regulators: Modify monitorSensors() to use Services

Modify the monitorSensors() method in the System, Chassis, Device, and
Rail classes to have a new first parameter: Services& services.

Modify Sen

regulators: Modify monitorSensors() to use Services

Modify the monitorSensors() method in the System, Chassis, Device, and
Rail classes to have a new first parameter: Services& services.

Modify SensorMonitoring::execute() to log messages using the new
Journal interface.

Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: I05820cfa94bc3d15dee7a1714a3d253720aa7f92

show more ...

5cfe510330-Jul-2020 Bob King <Bob_King@wistron.com>

regulators: Modify Configuration to use Journal

Modify Configuration::execute() to log messages using
the new Journal interface.

Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: If7dee12ca

regulators: Modify Configuration to use Journal

Modify Configuration::execute() to log messages using
the new Journal interface.

Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: If7dee12ca064147386fc076223474f004281d7ec

show more ...

12345678910>>...13