edd211e4 | 28-Oct-2022 |
Michal Orzel <michalx.orzel@intel.com> |
Handle possible SdBus exceptions
Right now service allows to access several signals using DBus interface, instead of GPIO pins. In case of that option selected in config, service will try to read gi
Handle possible SdBus exceptions
Right now service allows to access several signals using DBus interface, instead of GPIO pins. In case of that option selected in config, service will try to read given DBus property using function getProperty. Unfortunately that attempt might fail, for example when that specific object doesn't exist yet, which will cause with unhandled exception and evantually service restart.
This change adds handler for that sort of exception. If read property fails, another one will be scheduled in the next second. That process shall be repeated until value is successfully read. As there are several possible properties to read, each one shall utilize its own timer, so that every failure can be handled independently from each other.
Tested: Change has been tested on Intel platform, which showed symptoms described above: service tried to get property which has not yet been created, which caused its crash and restart. With this fix applied, issue stopped reproducing.
Change-Id: Ib9b89e07a348868d2f15ffda31b3dc9a47340873 Signed-off-by: Michal Orzel <michalx.orzel@intel.com>
show more ...
|
891bbde7 | 17-May-2023 |
Jonathan Doman <jonathan.doman@intel.com> |
Fix json exception when processing event_configs
power-control is crashing while processing the JSON config:
terminate called after throwing an instance of 'nlohmann::json_abi_v3_11_2::detail::type
Fix json exception when processing event_configs
power-control is crashing while processing the JSON config:
terminate called after throwing an instance of 'nlohmann::json_abi_v3_11_2::detail::type_error' what(): [json.exception.type_error.302] type must be boolean, but is object
due to casting the `events` object to a `bool` when the underlying JSON type is not a boolean.
Tested: Added debug print to show the value of `nmiWhenPoweredOff` and confirmed that it worked for three cases: true, false, and not specified in config (defaults to true).
Change-Id: I0182771a4125234df01ec39374531e5c51dec55a Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
show more ...
|
d7ea283b | 14-Apr-2023 |
Olivier FAURAX <olivier.faurax@eu.equinix.com> |
Add option to only log nmiButtonPress when host is running
While NMI button presses are of little interest when the host is off, some systems (e.g. romed8hm3) generates spurious events on shutdown,
Add option to only log nmiButtonPress when host is running
While NMI button presses are of little interest when the host is off, some systems (e.g. romed8hm3) generates spurious events on shutdown, probably due to some lack of electronic stability. This patch adds an option to disable handling these events when host is off.
Change-Id: Idc74b2dcb7131ddf6d99d1b8c49d947be98de78e Signed-off-by: Olivier FAURAX <olivier.faurax@eu.equinix.com>
show more ...
|
48aa1f05 | 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: I844971bd190187ba9ef2e8cf16809e2d16317ec4 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
f56ef594 | 12-Apr-2023 |
Patrick Williams <patrick@stwcx.xyz> |
meson: remove deprecated get_pkgconfig_variable
Since meson 0.56, the `get_pkgconfig_variable` has been deprecated. In meson 0.58 the `get_variable` was enhanced to no longer require the `pkgconfig
meson: remove deprecated get_pkgconfig_variable
Since meson 0.56, the `get_pkgconfig_variable` has been deprecated. In meson 0.58 the `get_variable` was enhanced to no longer require the `pkgconfig` keyword argument. Ensure meson 0.58 is required and update the usage of all `get_pkgconfig_variable` and `get_variable` to be the modern variant.
Change-Id: I8599189ddf9cdcbb564252d29244101ee9bd292d Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
cea510b7 | 07-Mar-2023 |
Ed Tanous <edtanous@google.com> |
Add missing include
Change-Id: If0e63127658840d98b9e5972a9bc13a7a351a83c Signed-off-by: Ed Tanous <edtanous@google.com> |
744e9a98 | 28-Feb-2023 |
Ed Tanous <edtanous@google.com> |
Change io_service to io_context
This was renamed a while back in boost to be compliant with the std::executors proposal.
Change-Id: Id8cda0486beed09984e570393921bd95835e5980 Signed-off-by: Ed Tanou
Change io_service to io_context
This was renamed a while back in boost to be compliant with the std::executors proposal.
Change-Id: Id8cda0486beed09984e570393921bd95835e5980 Signed-off-by: Ed Tanous <edtanous@google.com>
show more ...
|
9eb263ba | 01-Feb-2023 |
kuiying <wangkuiying.wky@alibaba-inc.com> |
Updagte Kuiying's email address
Kuiying's email address is changed to wangkuiying.wky@alibaba-inc.com
Change-Id: I20f37a9ee26b6ee40dfc799df7d417a7324f7934 Signed-off-by: kuiying <wangkuiying.wky@al
Updagte Kuiying's email address
Kuiying's email address is changed to wangkuiying.wky@alibaba-inc.com
Change-Id: I20f37a9ee26b6ee40dfc799df7d417a7324f7934 Signed-off-by: kuiying <wangkuiying.wky@alibaba-inc.com>
show more ...
|
c4b85b77 | 08-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
markdownlint: fix all warnings
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I59c8a25e738da834488e356f15678258636fdd47 |
abbcd4a5 | 08-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: I3608bb85305658ae95c705238800fb20d8841774 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
fa2b6448 | 01-Nov-2022 |
Zev Weiss <zev@bewilderbeest.net> |
OWNERS: Add myself as a reviewer
Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Change-Id: I9a89ffc59f10bf3d3d49082ecb97a6ce6a488592 |
58e379d1 | 23-Sep-2022 |
Matt Simmering <matthew.simmering@intel.com> |
Add option to ignore soft resets before POST
In some cases it is expected that the host will send a soft reset. This can overwrite previous power state changes which we may want to keep.
Tested: S
Add option to ignore soft resets before POST
In some cases it is expected that the host will send a soft reset. This can overwrite previous power state changes which we may want to keep.
Tested: Set restore policy to always on. AC cycle system. Check restart cause is always on, and not overwritten as soft reset
Once host has posted, do warm reset through host and check that restart cause is soft reset.
Change-Id: I0bd861f25680a11fc2e7eb77088f3009bcf8b03b Signed-off-by: Matt Simmering <matthew.simmering@intel.com>
show more ...
|
461a166a | 21-Sep-2022 |
Jian Zhang <zhangjian.3032@bytedance.com> |
NMI: Inverting the use of polarity
In idle state, the value of gpio should set to `!polarity` (if ActiveHigh, the low should set into the gpioline), and in the action, should use the polarity(not !p
NMI: Inverting the use of polarity
In idle state, the value of gpio should set to `!polarity` (if ActiveHigh, the low should set into the gpioline), and in the action, should use the polarity(not !polarity).
Change-Id: I20b37b71334f2ed4259421fc78a228da48bec8b5 Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>
show more ...
|
fe159037 | 01-Sep-2022 |
Jason M. Bills <jason.m.bills@intel.com> |
Always start psPowerOKWatchdog before waiting
There are a couple conditions where we wait for psPowerOK without starting the watchdog timer. This can result in getting stuck in the waiting state, so
Always start psPowerOKWatchdog before waiting
There are a couple conditions where we wait for psPowerOK without starting the watchdog timer. This can result in getting stuck in the waiting state, so we should always start the psPowerOKWatchdog timer before waiting.
Tested: Confirmed that power-control still starts normally.
Change-Id: I50a5c8a1a10e234e72c3bfe3f0c2070749d9ffde Signed-off-by: Jason M. Bills <jason.m.bills@intel.com>
show more ...
|
8643c797 | 17-May-2022 |
Ping Guo <guoping@inspur.com> |
Set NMI_OUT according to the configuration file
Configuration file supports setting the polarity of the nmi_out pin so we don't have to hardcode the polarity
Tested:
On a machine, without this cha
Set NMI_OUT according to the configuration file
Configuration file supports setting the polarity of the nmi_out pin so we don't have to hardcode the polarity
Tested:
On a machine, without this change, nmi_out always triggers and causes the host to crash
With this change, the host no longer crashes after the polarity of the nmi out pin is configured correctly
Change-Id: I34049136c0ede117eec50b5ce47698f1b319624c Signed-off-by: John Wang <wangzhiqiang02@inspur.com>
show more ...
|
9dbcee85 | 05-Sep-2022 |
Nan Zhou <nanzhoumails@gmail.com> |
add gitignore
Just like many other OpenBMC repos, this commit adds the gitignore file.
Also manually removed one indirect dependency wrap file.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Cha
add gitignore
Just like many other OpenBMC repos, this commit adds the gitignore file.
Also manually removed one indirect dependency wrap file.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: I751fc6398824d88a2a98341fbea822cc461aa728
show more ...
|
7ef52a8d | 05-Sep-2022 |
Nan Zhou <nanzhoumails@gmail.com> |
meson: rely on nlohmann json
This project relies on nlohmann json, but didn't specifies the correct dependency.
This commit adds the missing dep. The wrap file is from other repos.
Tested: it buil
meson: rely on nlohmann json
This project relies on nlohmann json, but didn't specifies the correct dependency.
This commit adds the missing dep. The wrap file is from other repos.
Tested: it builds
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: I18ba19085eec5e24e75859548de07e621e1fb163
show more ...
|
fd672c91 | 05-Sep-2022 |
Nan Zhou <nanzhoumails@gmail.com> |
subprojects: fix wraps
Fixed the missing two wrap files; also simplified meson deps via `[provide]`.
1. libgpiod; installed from WrapDB; reference: [1] https://mesonbuild.com/Wrapdb-projects.html T
subprojects: fix wraps
Fixed the missing two wrap files; also simplified meson deps via `[provide]`.
1. libgpiod; installed from WrapDB; reference: [1] https://mesonbuild.com/Wrapdb-projects.html This is also alligned with Yocto; reference: [1] https://github.com/openbmc/openbmc/blob/78b727985e7571e0b196561e44427690f04d57d9/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb 2. sdbusplus
Tested: builds on systems without the two dependencies where meson automatically downloads them
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: I81305c3f399fbe437cc8e32015e074eff93078bc
show more ...
|
b38fe837 | 19-Jul-2022 |
Karthikeyan Pasupathi <pkarthikeyan1509@gmail.com> |
Power restore policy to support multi-host platform.
Enable the power restore policy for the multi-host platform, change the policy to one of the states as the last Power State, always ON, and alway
Power restore policy to support multi-host platform.
Enable the power restore policy for the multi-host platform, change the policy to one of the states as the last Power State, always ON, and always OFF with default as the last power State.
Tested: Tested and verified with yosemitev2 multi-host platform.
Signed-off-by: Karthikeyan Pasupathi <pkarthikeyan1509@gmail.com> Change-Id: I222ddaed8e47a9c386943444943e6eda7e3b0252
show more ...
|
4c04af10 | 04-Aug-2022 |
Patrick Williams <patrick@stwcx.xyz> |
MAINTAINERS: remove file
The MAINTAINERS file is deprecated in favor of OWNERS.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic58b2cdf80cacc7d0fae26f0cb7a0bb7399e58ad
|
439b9c3a | 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: I73186ee02f4d3c85736516fa0bc036c76262e16e
show more ...
|
787975ca | 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
OWNERS: switch 'matches' to 'matchers'
The original OWNERS template had a mistake which used 'matches' instead of the field supported by the Gerrit plugin 'matchers'. Update the OWNERS file to have
OWNERS: switch 'matches' to 'matchers'
The original OWNERS template had a mistake which used 'matches' instead of the field supported by the Gerrit plugin 'matchers'. Update the OWNERS file to have the correct field.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I6f9ce471b2165a4f8ce7a2f1fadc480ba56f8997
show more ...
|
99e8f9df | 09-Jan-2022 |
Andrei Kartashev <a.kartashev@yadro.com> |
refactor power restore controller
Currently PowerRestorePolicy handling code uses two undocumented interfaces: * `xyz.openbmc_project.Control.Power.RestoreDelay` * `xyz.openbmc_project.Common.ACBoot
refactor power restore controller
Currently PowerRestorePolicy handling code uses two undocumented interfaces: * `xyz.openbmc_project.Control.Power.RestoreDelay` * `xyz.openbmc_project.Common.ACBoot`
Power Restore Delay seems to be logical part of `xyz.openbmc_project.Control.Power.RestorePolicy` interface and has been moved there.
ACBoot depends on some custom logic that can be found only in Intel-BMC fork.
This commit reorganize PowerRestorePolicy-related code to be more clear and flexible, fixes interface for RestoreDelay. Use of ACBoot feature is now optional and can be compile-time enabled.
Tested: Model power loss event with Off, On and Restore policy, verify, that power restored as expected. Test On policy with Delay set to 300000000 - ensure, power on delayed by 5 minutes. Test with ACBoot interface emulated. Signed-off-by: Andrei Kartashev <a.kartashev@yadro.com> Change-Id: Id8b42d2085f44418e02a7f52836cc1a6f55f50db
show more ...
|
809545a6 | 21-Dec-2021 |
Andrei Kartashev <a.kartashev@yadro.com> |
Update README file
Remove outdated information about passthrough: x86-power-control do nothing with this and works fine without any passthrough-related patches. Update compile options. Cleanup docum
Update README file
Remove outdated information about passthrough: x86-power-control do nothing with this and works fine without any passthrough-related patches. Update compile options. Cleanup document formatting.
Signed-off-by: Andrei Kartashev <a.kartashev@yadro.com> Change-Id: I370ce124770719365b14146aeb3bfcf998a8ec3a
show more ...
|
8623918b | 22-Dec-2021 |
Tim Lee <timlee660101@gmail.com> |
Correct osState string to match xyz naming format for fixing automation test
Symptom: "Verify Dump After Host Watchdog Error Injection" automation test item failed.
Root cause: Due to "Is OS Booted
Correct osState string to match xyz naming format for fixing automation test
Symptom: "Verify Dump After Host Watchdog Error Injection" automation test item failed.
Root cause: Due to "Is OS Booted" keyword got failed in lib/state_manager.robot.
According openbmc-test-automation/lib/variables.py The "os_state" must match to "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Standby".
But, "osState" string in x86-power-control just return "Standby" instead of "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Standby". Thus keyword "Is OS Booted" return failed then cause test item got failed.
Reference: openbmc-test-automation/lib/state_manager.robot: Is OS Booted [Documentation] Check OS status. ${os_state}= Get Host State Attribute OperatingSystemState Should Be Equal ${OS_BOOT_COMPLETE} ${os_state}
openbmc-test-automation/lib/variables.py: STATE_DBUS_BASE = 'xyz.openbmc_project.State.' OS_BOOT_COMPLETE = STATE_DBUS_BASE + \ 'OperatingSystem.Status.OSStatus.Standby'
Solution: Correct osState string to match xyz naming format and consistent with auto test.
Tested: Host Power ON: busctl call xyz.openbmc_project.State.Host /xyz/openbmc_project/state/host0 \ org.freedesktop.DBus.Properties \ GetAll s "xyz.openbmc_project.State.OperatingSystem.Status" a{sv} 1 "OperatingSystemState" s "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Standby"
Host Power OFF: busctl call xyz.openbmc_project.State.Host /xyz/openbmc_project/state/host0 \ org.freedesktop.DBus.Properties \ GetAll s "xyz.openbmc_project.State.OperatingSystem.Status" "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive"
Signed-off-by: Tim Lee <timlee660101@gmail.com> Change-Id: Ia63100a6756104a645c2d789d3b5be560a1305ff
show more ...
|