#
516e22fe |
| 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: Ie0fb147f556c18eb226736dd9b688afba5636a9b Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
#
5f51444d |
| 04-Jan-2024 |
Shawn McCarney <shawnmm@us.ibm.com> |
Move TemporaryFile class to root directory
Source code that is shared across applications is located in the root directory of the phosphor-power repository.
The TemporaryFile class was originally c
Move TemporaryFile class to root directory
Source code that is shared across applications is located in the root directory of the phosphor-power repository.
The TemporaryFile class was originally created for the phosphor-regulators application. However it is general purpose and is now needed by the phosphor-power-sequencer application.
Move the TemporaryFile class to the root directory. Update C++ files that use the TemporaryFile class since it is now in a different namespace. Update affected meson.build files.
Change-Id: I6d18080d2436a5da87b7ab51ac003c503caa36a3 Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
show more ...
|
#
5c6a693e |
| 29-Nov-2023 |
Patrick Williams <patrick@stwcx.xyz> |
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer retur
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer return true for auto features. Instead, the expectation is to use `allowed()` which is true for both enabled and auto.
Switch all uses of `enabled` to `allowed`.
Change-Id: I37fcb391dcb215a86a60c26f7512f6ccb8312dc4 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
888bebde |
| 31-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
meson: add necessary subprojects
Add subprojects for all the direct dependencies of the project such that the project can be built outside of a Yocto SDK on a typical Linux development system.
-
meson: add necessary subprojects
Add subprojects for all the direct dependencies of the project such that the project can be built outside of a Yocto SDK on a typical Linux development system.
- Update the .gitignore to ignore the subproject source directories. - Update the .gitignore to ignore alternative build subdirectory names as is typical with most projects in the openbmc organization. - Add wrap files for direct dependencies, copied from other repositories that already have the same dependencies. - Modify the meson.build dependency for libgpiod so that the C++ bindings are included. - Add many missing dependencies throughout. - Sort all dependencies alphabetically for consistency.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I0feb6f0f175e6dba0b00a2c2b666eb0801575734
show more ...
|
#
9284c307 |
| 02-Sep-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Implement phase_fault_detection object
Implement the new phase_fault_detection object in the JSON configuration file.
Create gtests to test the new class.
Signed-off-by: Shawn McCarney
regulators: Implement phase_fault_detection object
Implement the new phase_fault_detection object in the JSON configuration file.
Create gtests to test the new class.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I364281c83fbcc7fd26d2d7decb6d8338484af4e1
show more ...
|
#
3b242b72 |
| 27-Aug-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Implement i2c_capture_bytes action
Implement the new i2c_capture_bytes action in the JSON configuration file.
Create gtests to test the new class.
Signed-off-by: Shawn McCarney <shawnm
regulators: Implement i2c_capture_bytes action
Implement the new i2c_capture_bytes action in the JSON configuration file.
Create gtests to test the new class.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Ie43e147a0a076090729871140bb5889c74323d19
show more ...
|
#
fa23f7d1 |
| 26-Aug-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Implement log_phase_fault action
Implement the new log_phase_fault action in the JSON configuration file.
Create gtests to test the new class.
Signed-off-by: Shawn McCarney <shawnmm@us
regulators: Implement log_phase_fault action
Implement the new log_phase_fault action in the JSON configuration file.
Create gtests to test the new class.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I53130b029967d0a0d7b7fdd9b12f69035b9f085e
show more ...
|
#
421128ef |
| 25-Aug-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Add phase faults to ActionEnvironment
Enhance the ActionEnvironment class to support detecting and logging redundant phase fault errors.
Add gtests to test the new functions/methods.
S
regulators: Add phase faults to ActionEnvironment
Enhance the ActionEnvironment class to support detecting and logging redundant phase fault errors.
Add gtests to test the new functions/methods.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Id87d811374dd3da616cdeeb780b3575ef96ffbb7
show more ...
|
#
0a450197 |
| 12-Apr-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Add Sensors service
Define the abstract base class Sensors. This class represents a service that maintains a list of voltage regulator sensors.
This service makes the voltage regulator
regulators: Add Sensors service
Define the abstract base class Sensors. This class represents a service that maintains a list of voltage regulator sensors.
This service makes the voltage regulator sensors available to other BMC applications. For example, the Redfish support obtains sensor data from this service.
Each voltage rail in the system may provide multiple types of sensor data, such as temperature, output voltage, and output current. A sensor tracks one of these data types for a voltage rail.
Also define a concrete subclass MockSensors used for test cases.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I0b1c28161bad899c6dd75f87b7ee8e891c8781af
show more ...
|
#
aaa4fddb |
| 18-Mar-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Create error_logging_utils
Create the error_logging_utils namespace for utility functions that make it easier to log errors. Create two initial functions within the namespace.
The firs
regulators: Create error_logging_utils
Create the error_logging_utils namespace for utility functions that make it easier to log errors. Create two initial functions within the namespace.
The first function logs an error based on an exception. The exception may have one or more nested inner exceptions. The function finds the highest priority exception and logs a corresponding error.
The second function provides the same basic behavior as the first, but it adds an ErrorHistory parameter. An error will only be logged if it was not previously logged. The ErrorHistory object is used to determine whether an error has been previously logged. This avoids logging duplicate errors if a regulator operation is occurring repeatedly, such as reading sensor values.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: If246cde9a0f60c5bba34ae4a0d68fb511c0024fc
show more ...
|
#
18a8e491 |
| 20-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 ...
|
#
f3633f63 |
| 02-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 ...
|
#
b6f07c96 |
| 03-Sep-2020 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Create TemporaryFile class
Create class for handling temporary files: * Constructor creates the temporary file * Destructor deletes the temporary file * Provides move constructor and mov
regulators: Create TemporaryFile class
Create class for handling temporary files: * Constructor creates the temporary file * Destructor deletes the temporary file * Provides move constructor and move assignment operator so that class can be stored in containers like std::vector * Throws exception if errors occur creating or deleting the temporary file
This class is an enhanced version of the TmpFile class in the test directory. A future commit will delete TmpFile and modify testcases to use TemporaryFile instead.
Tested: * Created automated tests for most of the code in the class. * Manually tested some error cases that were difficult to automate.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Ieda58f4d2738dc4f184232936bc082c0d3a93fa0
show more ...
|
#
8109502f |
| 16-Jul-2020 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Create services interface
Create an interface to system services like error logging and the journal.
This interface is a container for a set of system services. It can be passed as a s
regulators: Create services interface
Create an interface to system services like error logging and the journal.
This interface is a container for a set of system services. It can be passed as a single parameter to the rest of the application. It also simplies automated testing.
Class hierarchy: * Services: Abstract base class that defines the interface * BMCServices: Implementation that uses standard BMC services * MockServices: Implementation that uses mock services
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I4ac8696e2a9ef6521b369df532ea00bc483708c1
show more ...
|
#
66332cd7 |
| 13-Jul-2020 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Create ErrorHistory class
Create a class to track error history, such as error count and whether the error has been logged.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id:
regulators: Create ErrorHistory class
Create a class to track error history, such as error count and whether the error has been logged.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Iead88963110a699eee1d6cd8750303f05d6ecef1
show more ...
|
#
d6820bb8 |
| 28-Apr-2020 |
Bob King <Bob_King@wistron.com> |
regulators: Create regulators PMBusReadSensorAction class
Create the PMBusReadSensorAction class that implements the "pmbus_read_sensor" action in the JSON config file.
Only create the .hpp file fo
regulators: Create regulators PMBusReadSensorAction class
Create the PMBusReadSensorAction class that implements the "pmbus_read_sensor" action in the JSON config file.
Only create the .hpp file for PMBusReadSensorAction class first.
Signed-off-by: Bob King <Bob_King@wistron.com> Change-Id: I689ad9dbefe601d8962c694e7e1b8b7275ba6880
show more ...
|
#
8e4cb645 |
| 24-Apr-2020 |
Bob King <Bob_King@wistron.com> |
regulators: Create regulators CompareVPDAction class
Create the CompareVPDAction class that implements the "compare_vpd" action in the JSON config file.
Only create the .hpp file for CompareVPDActi
regulators: Create regulators CompareVPDAction class
Create the CompareVPDAction class that implements the "compare_vpd" action in the JSON config file.
Only create the .hpp file for CompareVPDAction class first.
Signed-off-by: Bob King <Bob_King@wistron.com> Change-Id: I49663e1f9a2a28996b397cca47eb2c47847592bf
show more ...
|
#
df42c0d6 |
| 29-Apr-2020 |
Shawn McCarney <shawnmm@us.ibm.com> |
Add 'long-tests' build option
Add a new meson build option for handling long-running tests that should be excluded from CI.
Meson enforces a timeout on testcases. If the testcase runs longer than
Add 'long-tests' build option
Add a new meson build option for handling long-running tests that should be excluded from CI.
Meson enforces a timeout on testcases. If the testcase runs longer than the timeout value, the testcase is considered failed.
The timeout value can be increased, but sometimes this is still insufficient. Testcases are run multiple times in CI, including within environments like valgrind that increase their run times.
Very long running testcases should probably be excluded from CI runs rather than setting the timeout to an arbitrarily large value like 5 minutes.
The 'long-tests' option defaults to disabled. Long-running tests will only be built and run if option is explicitly set to enabled.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I012d15a74df70e2741fc44009294d2134787c8e0
show more ...
|
#
07301eac |
| 21-Apr-2020 |
Bob King <Bob_King@wistron.com> |
regulators: Create regulators ComparePresenceAction class
Create the ComparePresenceAction class that implements the "compare_presence" action in the JSON config file.
Only create the .hpp file for
regulators: Create regulators ComparePresenceAction class
Create the ComparePresenceAction class that implements the "compare_presence" action in the JSON config file.
Only create the .hpp file for ComparePresenceAction class first.
Signed-off-by: Bob King <Bob_King@wistron.com> Change-Id: If2cbe5e363ae92618604887f5c534dfa10ab216f
show more ...
|
#
55f496c5 |
| 09-Apr-2020 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Create exception_utils namespace
This namespace contains utility functions for handling exceptions.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Ie945c7882cdede398af56d
regulators: Create exception_utils namespace
This namespace contains utility functions for handling exceptions.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Ie945c7882cdede398af56dcd2d2c3c9c70320e92
show more ...
|
#
bafcb86c |
| 31-Mar-2020 |
Bob King <Bob_King@wistron.com> |
regulators: Implements support for i2c_write_bytes
Implements support for parsing the i2c_write_bytes JSON elements in the configuration file parser.
Signed-off-by: Bob King <Bob_King@wistron.com>
regulators: Implements support for i2c_write_bytes
Implements support for parsing the i2c_write_bytes JSON elements in the configuration file parser.
Signed-off-by: Bob King <Bob_King@wistron.com> Change-Id: I6233361a6cc5a243b563e59e1aec70eec7a5b7f5
show more ...
|
#
c3991f16 |
| 05-Apr-2020 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Create System class
Create a C++ class that represents the entire computer system being controlled and monitored by the BMC.
The system contains one or more chassis. Chassis are large
regulators: Create System class
Create a C++ class that represents the entire computer system being controlled and monitored by the BMC.
The system contains one or more chassis. Chassis are large enclosures that can be independently powered off and on by the BMC.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Iba40637a229c1787b017e7f19b011192621a5d23
show more ...
|
#
7c5d7b27 |
| 03-Apr-2020 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Create journal interface
Create a light-weight interface for logging messages to the systemd journal.
The standard interface implementation calls the phosphor-logging functions to creat
regulators: Create journal interface
Create a light-weight interface for logging messages to the systemd journal.
The standard interface implementation calls the phosphor-logging functions to create real journal entries. This is the implementation that the phosphor-regulators application links with.
The mock interface implementation stores the journal messages in static vectors and provides functions to access them. This is the implementation that testcases link with.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I5421794f7402f999b65c8367db5dd5ba07110f4a
show more ...
|
#
e85499b6 |
| 27-Mar-2020 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Skip validation tool tests in SDK
Automated unit tests exist for the phosphor-regulators configuration file validation tool.
The unit tests run the validation tool against various input
regulators: Skip validation tool tests in SDK
Automated unit tests exist for the phosphor-regulators configuration file validation tool.
The unit tests run the validation tool against various input files. The validation tool is written in Python and requires the 'jsonschema' Python module to be installed. This module is not currently installed within the SDK build/test execution environment.
Modify the meson build file to skip the validation tool tests when building from within an SDK environment.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I4d79e4082855867b5543867d79dfe19b802b4837
show more ...
|
#
0e8c68ab |
| 27-Mar-2020 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Create configuration file parser
Create the initial version of the configuration file parser. This will parse the JSON configuration file that controls the phosphor-regulators applicati
regulators: Create configuration file parser
Create the initial version of the configuration file parser. This will parse the JSON configuration file that controls the phosphor-regulators application.
This commit implements support for parsing the following JSON elements: * root element in the config file (config_file.md) * array of rules * rule (rule.md) * array of actions * action (action.md) * pmbus_write_vout_command (pmbus_write_vout_command.md) * array of chassis (chassis.md)
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Id5f239517e1828e475fa81e26c56b85f678920cb
show more ...
|