History log of /openbmc/x86-power-control/src/ (Results 1 – 25 of 32)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
05e8ea8e03-Jul-2024 Renze Nicolai <renze@rnplus.nl>

x86-power-control: add passthrough option

Add a power and reset button passthrough option
for emulating button behavior by directly controlling
the control output pin.

Change-Id: I50df3e604401b4afd

x86-power-control: add passthrough option

Add a power and reset button passthrough option
for emulating button behavior by directly controlling
the control output pin.

Change-Id: I50df3e604401b4afd43fa89a0709466bbf01638b
Signed-off-by: Renze Nicolai <renze@rnplus.nl>

show more ...

c6d7565610-Sep-2024 Jason M. Bills <jason.m.bills@linux.intel.com>

Update PostComplete polarity

After recent changes adding support for GPIO polarity in the config file
and using only active-high polarity for D-Bus, the PostComplete polarity
was left out of sync in

Update PostComplete polarity

After recent changes adding support for GPIO polarity in the config file
and using only active-high polarity for D-Bus, the PostComplete polarity
was left out of sync in a couple places.

This fixes PostComplete, so the correct polarity is used in all cases.

Tested:
Confirmed in D-Bus mode that PostComplete correctly initializes the OS
State and correctly updates the OS State on PropertiesChanged events.

Change-Id: Iae626de79b5f13292372081f14ca5ca75420a1c2
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>

show more ...

a0a39f8216-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: I474dc261d5698b702bab7b9305c1d6958f43d40f
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

1cc7921f19-Jun-2024 Zev Weiss <zev@bewilderbeest.net>

Filter more precisely in dbusGPIOMatcher()

Previously we'd been matching only on the interface name. It is
possible, however, that there might exist multiple providers of the same
interface while w

Filter more precisely in dbusGPIOMatcher()

Previously we'd been matching only on the interface name. It is
possible, however, that there might exist multiple providers of the same
interface while we only want to match on a specific object from one
provider. Since we have the service name and object path available in
the config, let's add them to the match filter rule to specify only
exactly the signals we're interested in.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: Ib29c5d021e519c3501b177f6e26eda664cc29964

show more ...

d603dd1b19-Jun-2024 Zev Weiss <zev@bewilderbeest.net>

Ensure all dbus inputs are treated as active-high

Previously the polarity member of the ConfigData struct wasn't getting
set in loadConfigValues(), so it retained its default value
(active-low). Ac

Ensure all dbus inputs are treated as active-high

Previously the polarity member of the ConfigData struct wasn't getting
set in loadConfigValues(), so it retained its default value
(active-low). Active-low inputs via dbus don't make much sense, so
let's normalize them all to be active-high.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I529fd6362db9a49b859f97a231c09d23a782c23d

show more ...

ca47855d11-Jun-2024 Zev Weiss <zev@bewilderbeest.net>

Extend dbus config with MatchRegex support

Previously only boolean properties were supported as dbus inputs. For
some signals other types may be useful however, one common case being
strings for en

Extend dbus config with MatchRegex support

Previously only boolean properties were supported as dbus inputs. For
some signals other types may be useful however, one common case being
strings for enum values. We can now specify a MatchRegex key in a dbus
input's config block to specify a regular expression that determines
whether a given string value is converted to true (asserted) or false.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: Ib048151cb20d4c6a9370587d2ee583cb92f617f6

show more ...

edc86f3506-May-2024 Zev Weiss <zev@bewilderbeest.net>

Respect polarity config on input signals

Previously the polarity setting was (in all but one case) only being
used in setting outputs driven by the daemon. With this change we also
take it into acc

Respect polarity config on input signals

Previously the polarity setting was (in all but one case) only being
used in setting outputs driven by the daemon. With this change we also
take it into account in determining whether input signals are asserted
or deasserted.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: Ifd326e9c64de144dc45d217be5212329a5f3d242

show more ...

3373791322-Feb-2024 Potin Lai <potin.lai@quantatw.com>

Move OS state interface to state/hostX

Move OS state interface from state/os to state/hostX to make it
consistent with phosphor-state-manager.

Tested result:
```
root@harma:~# busctl introspect xyz

Move OS state interface to state/hostX

Move OS state interface from state/os to state/hostX to make it
consistent with phosphor-state-manager.

Tested result:
```
root@harma:~# busctl introspect xyz.openbmc_project.State.Host0 /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.OperatingSystem.Status
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
.OperatingSystemState property s "xyz.openbmc_project.State.OperatingSys… emits-change
```

Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: Idd744285ce3c43add37d17ddd2de4eb6c250853d

show more ...

6af569fd11-Mar-2024 Tim Lee <timlee660101@gmail.com>

Correct naming of NMI button in BMCSourceSignal

NMISource related properties already moved from "intel-dbus-interface"
to "phospher-dbus-interfaces".

However, the name "FpBtn" is using for "com.int

Correct naming of NMI button in BMCSourceSignal

NMISource related properties already moved from "intel-dbus-interface"
to "phospher-dbus-interfaces".

However, the name "FpBtn" is using for "com.intel", not for
"xyz.openbmc_project" that is using "FrontPanelButton" according to
"xyz/openbmc_project/Chassis/Control/NMISource.interface.yaml".

Thus, need to correct this naming to match current design.

Signed-off-by: Tim Lee <timlee660101@gmail.com>
Change-Id: I9629950fbb077ebf59cd3ef14e382fd40a739895

show more ...

cfc4d25e18-Nov-2021 Konstantin Aladyshev <aladyshev22@gmail.com>

Add HpmStbyEn signal

HpmStbyEn signal is a special signal that can be found on AMD boards.
It indicates that all DC-SCM STBY power rails are enabled and good.
The signal enables STBY power rails on

Add HpmStbyEn signal

HpmStbyEn signal is a special signal that can be found on AMD boards.
It indicates that all DC-SCM STBY power rails are enabled and good.
The signal enables STBY power rails on the HPM.
It is a level GPIO, and if it is not activated, onboard CPLD wouldn't
relinquish control of power control GPIOs to BMC making it impossible
to power on the host.
Therefore if this GPIO is present in the JSON configuration activate it
in the main function.

Tested on the AMD EthanolX/Onyx CRB
Onyx verification: power on/off, application restart at power on/off
and bmc reboot.

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
Change-Id: I3a21c2e5214dfcf05cdae8efc2ebbb21c4b4e080

show more ...

dc0bab9207-Feb-2024 Jayanth Othayoth <ojayanth@gmail.com>

event: reset button pressed event updates

Existing code doesn't handle "resetButtonPressed" correctly.
This commits adds the "resetButtonPressed" event handling
during power state on.

Tested: Verif

event: reset button pressed event updates

Existing code doesn't handle "resetButtonPressed" correctly.
This commits adds the "resetButtonPressed" event handling
during power state on.

Tested: Verified power sequencing on AMD CRB Onyx.

Change-Id: I65e5b2236032f7b04b4345da752b467981409612
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>

show more ...

d394c88720-Oct-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-17 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-17 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: Iff253307fce5ebb3dff66b87e2742919cc5b30b8
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

edd211e428-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 ...

891bbde717-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 ...

d7ea283b14-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 ...

48aa1f0510-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 ...

cea510b707-Mar-2023 Ed Tanous <edtanous@google.com>

Add missing include

Change-Id: If0e63127658840d98b9e5972a9bc13a7a351a83c
Signed-off-by: Ed Tanous <edtanous@google.com>

744e9a9828-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 ...

58e379d123-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 ...

461a166a21-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 ...

fe15903701-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 ...

8643c79717-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 ...

b38fe83719-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 ...

439b9c3a22-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 ...

99e8f9df09-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 ...

12