Move phosphor-regulators, tools, base dir to lg2Update the logging API for files in phosphor-regulators, tools,and the base directory from the older phosphor::logging::logstyle of journal traces
Move phosphor-regulators, tools, base dir to lg2Update the logging API for files in phosphor-regulators, tools,and the base directory from the older phosphor::logging::logstyle of journal traces to the newer lg2::log style. Alsofix bug involving corruption of string data in PMBus class.Tested:* Verified journal traces worked correctly in simulation and produced correct journalctl key-value pairs.* Temporarily modified both json configs and source code to force various messages, and verified their presence in the journalctl output.* Verify that change in PMBus class correctly fixed corrupted string data by building and running a temporary executable with the change included.Change-Id: I9c3e380bf2103c5ddc051a5dc90ba2c0d3f38796Signed-off-by: Anwaar Hadi <anwaar.hadi@ibm.com>
show more ...
sdbusplus: use shorter type aliasesThe sdbusplus headers provide shortened aliases for many types.Switch to using them to provide better code clarity and shorterlines. Possible replacements are
sdbusplus: use shorter type aliasesThe sdbusplus headers provide shortened aliases for many types.Switch to using them to provide better code clarity and shorterlines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_tSigned-off-by: Patrick Williams <patrick@stwcx.xyz>Change-Id: Ief05bd757cffb1453e058a719ee4b060861752e7
catch exceptions as constSigned-off-by: Patrick Williams <patrick@stwcx.xyz>Change-Id: If6aba71f482f75143e6d669763b8853db22318cf
clang updatesThe openbmc CI was recently updated to clang-12 which requires someformatting updates to the code:https://github.com/openbmc/openbmc-build-scripts/commit/4569bf49daaebff06be048242690
clang updatesThe openbmc CI was recently updated to clang-12 which requires someformatting updates to the code:https://github.com/openbmc/openbmc-build-scripts/commit/4569bf49daaebff06be0482426908bb5497fad08Make those updates and refresh the clang-format file with the one fromdocs:https://github.com/openbmc/docs/blob/master/style/cpp/.clang-formatChange-Id: Ieb3626526373a053ec84431e7560003f229f338dSigned-off-by: Adriana Kobylak <anoo@us.ibm.com>
regulators: Stop boot if cfg file not found/validStop the boot during a BMC chassison/poweron if the regulators JSONconfiguration file cannot be found or is invalid.During the boot, the regulato
regulators: Stop boot if cfg file not found/validStop the boot during a BMC chassison/poweron if the regulators JSONconfiguration file cannot be found or is invalid.During the boot, the regulators application configures the voltageregulators in the system. One of the most important voltage regulatorsettings that can be changed is the output voltage.The rules on how to configure the voltage regulators are defined in theJSON config file. If this file cannot be found or is invalid, thevoltage regulators cannot be configured.That would mean that the voltage regulators would be turned on duringthe boot using their hardware default settings. It is common for someof the hardware defaults to be incorrect, occasionally by a significantamount.If the hardware defaults are significantly off, it is possible thathardware damage could occur. For example, if the output voltage is toohigh, downstream hardware components could be damaged.For this reason, the boot needs to be stopped. A critical error islogged, and the executable run by the systemd service file exits with anon-zero return code indicating failure.Note that this behavior will only occur if the phosphor-regulatorsapplication is being used. The application must be explicitly enabledusing a meson build option.Tested:* Verified that boot is stopped if JSON config file not found/valid * Verified critical error logged * Verified regsctl exits with non-zero value causing config service to fail* Verified that boot continues if JSON config file valid* Tested with both 'obmcutil chassison' and 'obmcutil poweron'* For complete test plan see https://gist.github.com/smccarney/8801cad1fe1c4ae8913e57d9474bfaacSigned-off-by: Shawn McCarney <shawnmm@us.ibm.com>Change-Id: I211f19cd9b98daea86645611633f8943c44b0f75
regs: Add private manager dbus interfaceCreate a manager interface that is private to the regulators applicationwhich can be extended to provide a dbus inteface containing methods toconfigure and
regs: Add private manager dbus interfaceCreate a manager interface that is private to the regulators applicationwhich can be extended to provide a dbus inteface containing methods toconfigure and monitor regulators. Since this interface is private to theregulators application, it will only be accessed thru a standaloneapplication, TBD, which will be maintained within thephosphor-regulators repository.Signed-off-by: Matthew Barth <msbarth@us.ibm.com>Change-Id: I615e2a0f711baa8a8e70d443f6256dc175b4abca